enter image description here

Hi, I would like to draw something like the image below using TikZ - a great circle passing through two points on a sphere.

  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.
    – Community Bot
    Jul 12 at 18:21
  • As our community bot already pointed out: Please tell us a bit more. Do you just want to re-drew the above picture using TikZ or do you need an exact diagram where you have two points given and need to draw a great circle through these? Jul 12 at 18:51

1 Answer 1


Welcome to TeX.SX! Surely, it depends on what you concretely want to achieve. In case you just want to recreate the above picture, you could re-use this previous answer of mine. Perhaps a little exaggerated, but also quite adaptable:


% Style to set camera angle, like PGFPlots `view` style
\tikzset{viewport/.style 2 args={

% Convert from spherical to cartesian coordinates
    {sin(#1)*cos(#2)}, % X coordinate
    {cos(#1)*cos(#2)}, % Y coordinate
    {sin(#2)}          % Z (vertical) coordinate


    \path[draw] (0,0) circle (1);


        \draw[variable=\t, smooth] 
            plot[domain=90-\RotationX:-90-\RotationX] (\ToXYZ{\t}{0});
        \draw[densely dashed, variable=\t, smooth]
            plot[domain=90-\RotationX:270-\RotationX] (\ToXYZ{\t}{0});
        \draw[variable=\t, smooth, red] 
            plot[domain=90-\RotationY:-90-\RotationY, rotate around y=20] (\ToXYZ{0}{\t});
        \draw[densely dashed, variable=\t, smooth, red]
            plot[domain=90-\RotationY:270-\RotationY, rotate around y=20] (\ToXYZ{0}{\t});
        \draw[variable=\t, smooth, red, very thick] 
            plot[domain=70:0, rotate around y=20] (\ToXYZ{0}{\t});
        \node[circle, fill=red, inner sep=1pt, label={210:$B$}] at (\ToXYZ{0}{0}) {};
        \node[circle, fill=red, inner sep=1pt, label={120:$A$}, rotate around y=20] at (\ToXYZ{0}{70}) {};


enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.