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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am going to use tikz to make the following picture (see below). I don't need advice or help in making the picture just estimating the ellipse since I don't have anything to reference.

The ellipse that is a main concern is the mars path. How can I construct this ellipse in the lieu of data so it is proportionally correct?


share|improve this question
In polar coordinates each of the ellipses has an equation of the form $r = \frac{e\cdot d}{1 + e \cos(\theta)}$, where e < 1 is the eccentricity and d is the distance from the origin to the directrix. You could play with those parameters to draw ellipses sharing a common focus. – Matthew Leingang Apr 12 '13 at 18:03
@MatthewLeingang how will I be able to rotate the ellipse? The semi-major and minor axis don't lie on x and y axis? The are rotated by 120 degrees. – dustin Apr 12 '13 at 18:11
Maybe you could use the rotate key. – Matthew Leingang Apr 12 '13 at 18:22
Change thêta to thêta - thêta0. – cjorssen Apr 12 '13 at 22:08
up vote 5 down vote accepted

I find GeoGebra to be a helpful tool in cases like this.

You can insert a picture in the background, lock it so that it doesn't move, build your figure on top of it, and Geogebra will give you coordinates for your points and equations for your curves.

What's even better, it will automatically generate TikZ code for you. Now honestly, the automatically generated code is ugly, but if you know TikZ, it's pretty easy to delete all the cruft and get what you want.

In about 90 seconds of work with GeoGebra, I had:



    \draw [rotate around={-45.24:(3.19,3.12)}] (3.19,3.12) ellipse (3.32cm and 2.84cm);

enter image description here

share|improve this answer
What were your commands in Geogebra that made the ellipse? – dustin Apr 12 '13 at 18:13
I didn't use the command line. Made three points, eyeballing two where I thought the foci would be and one on the edge. Then used the ellipse tool (that should be equivalent to Ellipse[A,B,C]). It wasn't perfect at first, but super-easy to adjust to my satisfaction. – kmacinnis Apr 12 '13 at 18:17
The new (and better) circle and ellipse path operators allow us to do \draw (3.19,3.12) ellipse [x radius=3.32cm, y radius=2.84cm, rotate=-45.24]; without the need to specify the center point twice. – Qrrbrbirlbel Apr 12 '13 at 18:52
True, even after you delete all of the cruft that the geogebra code-generator puts in, the code can still be improved. – kmacinnis Apr 12 '13 at 19:02

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.