Using tikz-3dplot, I would like to draw the great circle that delineates what would be the outline of the sphere of radius 1 as seen from the fixed viewpoint (in other words, the plane perpendicular to the vector describing the view direction) in order to avoid other great circles to give the impression that they "go out" of that sphere (purple outlines in the figure below, so which doesn't show any overlap with every of the other great circles).





\coordinate (O) at (0,0,0);
% Axes
\draw[thick,->] (O) -- (2.0,0,0) node[anchor=north east]{$X$};
\draw[thick,->] (O) -- (0,2.0,0) node[anchor=north west]{$Y$};
\draw[thick,->] (O) -- (0,0,1.4) node[anchor=south]{$Z$};

% Great circle in the OXZ plane
\tdplotdrawarc[tdplot_rotated_coords,loosely dashed,gray]{(O)}{\rvec}

% Great circle in the OYZ plane
\tdplotdrawarc[tdplot_rotated_coords,losely dashed,gray]{(O)}{\rvec}

% Great circle in the OXY plane
\tdplotdrawarc[loosely dashed,blue]{(O)}{\rvec}{125}{305}{}{}

%% Testing great circles
% Rotated Great circle around Z-axis, this is the first wanted rotation
% to bring it in the original, non rotated "O-Y_ori-Z" plane.

% Rotated big circle around Y-axis, this second rotation should be applied
% just after the previous one, i.e. on the great circle colored in cyan.
% How to do that ?


Result of the current code:

Resulting drawing

What I would like is to get the result of the composition of the first, then the second rotation (in that order) in the Testing part but I don't know how to tell that to tikz.

1 Answer 1


Adding this to the tikzpicture solved the described problem:


Here is a the resulting circle (in red) for a polar angle of 55 degrees instead of 75 for a better visual effect:


The magical appears by using the \tdplotsetrotatedcoords function:

tdplotsetrotatedcoords function definition

Source: The tikz-3dplot Package by Jeff Hein, January 24, 2010

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .