|
@@ -0,0 +1,33 @@
|
|
|
|
+\documentclass{article}
|
|
|
|
+\usepackage[pdftex,active,tightpage]{preview}
|
|
|
|
+\setlength\PreviewBorder{2mm}
|
|
|
|
+\usepackage{tikz}
|
|
|
|
+\usepackage{tikz-3dplot}
|
|
|
|
+
|
|
|
|
+\begin{document}
|
|
|
|
+\begin{preview}
|
|
|
|
+ \tdplotsetmaincoords{70}{110}
|
|
|
|
+
|
|
|
|
+ \begin{tikzpicture}[scale=3,tdplot_main_coords]
|
|
|
|
+ \draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]{$x$};
|
|
|
|
+ \draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]{$y$};
|
|
|
|
+ \draw[thick,->] (0,0,0) -- (0,0,1) node[anchor=south]{$z$};
|
|
|
|
+ \tdplotsetcoord{O}{0}{0}{0}
|
|
|
|
+ \tdplotsetcoord{P}{.8}{50}{70}
|
|
|
|
+
|
|
|
|
+ %draw a vector from origin to point (P)
|
|
|
|
+ \draw[-stealth,color=red] (O) -- (P);
|
|
|
|
+
|
|
|
|
+ %draw projection on xy plane, and a connecting line
|
|
|
|
+ \draw[dashed, color=red] (O) -- (Pxy);
|
|
|
|
+ \draw[dashed, color=red] (P) -- (Pxy);
|
|
|
|
+ \tdplotsetthetaplanecoords{70}
|
|
|
|
+ \draw[tdplot_rotated_coords,color=blue,thick,->] (0,0,0)
|
|
|
|
+ -- (.2,0,0) node[anchor=east]{$x'$};
|
|
|
|
+ \draw[tdplot_rotated_coords,color=blue,thick,->] (0,0,0)
|
|
|
|
+ -- (0,.2,0) node[anchor=north]{$y'$};
|
|
|
|
+ \draw[tdplot_rotated_coords,color=blue,thick,->] (0,0,0)
|
|
|
|
+ -- (0,0,.2) node[anchor=west]{$z'$};
|
|
|
|
+ \end{tikzpicture}
|
|
|
|
+\end{preview}
|
|
|
|
+\end{document}
|