Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am working in the field of Astrodynamics and have to do many computations using spherical geometry. To visualize some of the concepts I would like to prepare drawings of things like spherical triangles, planes around the earth, or circles projected onto the sphere. Here are some examples (1):

Examples of plots Examples of plots

How is this possible to do in TeX? I had a look whether this could be done with TikZ but could not find any comparable examples. I am convinced that in theory it should be possible to prepare a TikZ extension that does things like this rather simply, but at the moment I am looking for an already existing solution to accomplish such tasks. When I get more experienced with making such plots I might consider writing a basic package.

The question is thus actually threefold:

  1. Is it possible to make such plots in LaTeX with current packages?
  2. If yes, with TikZ? Could you give me an example how to start?
  3. If not, what software would you recommend to prepare and include such kind of 3D graphics?

Please note that this is not the kind of question you sometimes get here that asks "Please do this for me!" I honestly tried solving this problem but did not get far at all. It would be really great to get an answer, a lot of people in my field would benefit from this.

(1) Wertz, James R. (2009). Orbit & Constellation Design & Management. New York: Springer.

share|improve this question
You should work with Altermundus! See How can I draw an arc from point A -> B on a 3D sphere in TikZ?. I'd love to see this come together! –  Jake Apr 26 '12 at 14:42
I have great respect for Altermunduns and this would be my first package, so I'd rather get started first ;-). It does not seem like an easy issue though. –  Ingo Apr 26 '12 at 15:21
drawing the spheres could be done with pgfplots such as \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis} \addplot3[mesh, samples=20, domain=0:2*pi,y domain=0:pi, ] ({cos(deg(x)) * sin(deg(y))}, {sin(deg(x)) * sin(deg(y))}, {cos(deg(y))}); \end{axis} \end{tikzpicture} \end{document} not sure about the other bits though :) –  cmhughes Apr 26 '12 at 16:52
I started some works about spherical geometry and the link given by Jake is the first step. I think it's possible with TikZ to create all the pictures of the question. Actually I try to create a macro to draw spherical triangles. –  Alain Matthes Apr 26 '12 at 18:29
I forgot to give this link melusine.eu.org/syracuse/pstricks/pst-solides3d/bonus/… You can work with pst-solides3d and pst-eucl –  Alain Matthes Apr 27 '12 at 6:41

1 Answer 1

The R package GeoMap will create Spherical project of the earth with the continent maps. I have not used it except to verify it loads and builds a map. If you combine with the package tikzDevice you will get tikz code which could be modified. Be aware that it will be a large file due to the extensive use of points for plotting.

Once this is working you should be able to implement with Sweave so that all the code is contained within the LaTeX file.

I would consider this just a workaround until a tikz package was built with pure tikz.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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