\documentclass{minimal}
\usepackage{tikz,tikz-3dplot}
\begin{document}
\tdplotsetmaincoords{70}{115}
\begin{tikzpicture}[scale=4,tdplot_main_coords]
\pgfmathsetmacro{\rvec}{.8}
\pgfmathsetmacro{\thetavec}{30}
\pgfmathsetmacro{\phivec}{60}
\tdplotsetrotatedcoords{\phivec}{\thetavec}{0}
\coordinate (O) at (1,1,1);
%these 2 lines overlap
\draw[thick,->] (O) -- (0,.5,0);
\draw[thick,tdplot_rotated_coords,->] (O) -- (0,.5,0);
%these 2 lines dont overlap
\draw[thick,->] (1,1,1) -- (0,.5,0);
\draw[thick,tdplot_rotated_coords,->] (1,1,1) -- (0,.5,0);
\end{tikzpicture}
\end{document}
Asked
Active
Viewed 55 times
0
Martin Scharrer
- 262,582
epsilon8
- 5,961
-
1I see that you've add this example to Why such rotate in tikz doesn't work? so I'm voting to close this as a duplicate. – Andrew Stacey Feb 22 '13 at 10:39
-
Hmm, the rules on closing-as-duplicate have been changed. So I'm flagging for moderation attention instead. – Andrew Stacey Feb 22 '13 at 10:43