I would like to do something similar to the (first) answer to this question, i.e. the MWE given by:



  point/.style = {draw, circle, fill=black, inner sep=0.7pt},
\coordinate (O) at (0,0); 
\coordinate (N) at (0,\rad); 

\filldraw[ball color=white] (O) circle [radius=\rad];
  (\rad,0) arc [start angle=0,end angle=180,x radius=\rad,y radius=5mm];
  (\rad,0) arc [start angle=0,end angle=-180,x radius=\rad,y radius=5mm];
  (-4,1) -- (3,1) -- (3,-1) -- (-4,-1) -- cycle;
\node at (2,0.6) {$P$};  
  (N) node[above] {$A$} -- (O) node[below] {$O$};
\node[point] at (N) {};


This produces:

Tangent Plane to a Sphere

What I would like, however, is to give a comparison between a rotation about e.g. the y-axis of e.g. 60 degrees and the corresponding translation in the tangent plane to A. In other words, I would like to draw a path on the surface of the sphere from A (i.e. the north pole (0,0,1)) to the point (sin(60),0,cos(60)). Moreover, I would like to draw a path in the tangent plane of the same length lying "above" the previous path, i.e. a straight-line path from A to (pi/3,0,1).

My goal is to have an image allowing one to make a comparison between such rotations and the translations sitting "above" them, and how these get closer together as the radius of the sphere gets larger (for the purposes of clearly, explicitly illustrating a simple example of group contractions).

Unfortunately, my unfamiliarity with TikZ has left my attempts at adapting the linked figure for my purposes unfruitful. Any suggestions on a simple way to do something like this?

  • Welcome to TeX.SX ! Unfortunately, the example you posted consists entirely of fake 3d. It would make little sense to do computations in this model.
    – marsupilam
    Commented Jun 5, 2017 at 11:04
  • Would there be any other way to do it? I'm not wed to the given example, it just seemed close enough to what I wanted. "Real 3d," whatever that might mean, would be perfectly acceptable as well. Commented Jun 5, 2017 at 11:06

1 Answer 1


Hope this gets you started.

I take inspiration from the official pgfplots sphere

The output

enter image description here

The code

\documentclass[tikz, border=2pt]{standalone}
    opacity = 0.35,
    z buffer = sort,
    samples = 50,
    y samples=25,
    variable = \u,
    variable y = \v,
    domain = 0:180,
        axis equal,
        scale uniformly strategy=units only,
        axis lines = none,
      \addplot3 % the background half=sphere
          y domain = 0:180,
        ({cos(u)*sin(v)}, {sin(u)*sin(v)}, {cos(v)});

        samples y=0,

      \coordinate (A) at ({tan(\myAng)},0,1) ;
      \draw [thick] (0,0,1) node [above] {$A$} -- (A) -- (0,0,0) -- cycle ;

      \addplot3 % the front half-sphere
          y domain = 180:360,
        ({cos(u)*sin(v)}, {sin(u)*sin(v)}, {cos(v)});

        \addplot3 [surf, green, opacity=.2,domain=-.8*\h:\h, y domain=-\h:.8*\h,samples=2, marks=none]{1} ;
        \node at (.9*\h,.65*\h,1) {$\mathcal{P}$};


You must log in to answer this question.

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