Hehe. Interesting... For an ellipse with two foci, F1 and F2, let the distance from each foci to the ellipse be a and b. In an ellipse, at any point, a+b is a constant value. My guess is that this etoys project works because that is essentially what is being demonstrated -- but at a 90-degree view. That is, the center of the circles reflects the foci -- but they need to be "rotated" to align with the major axis of the purple ellipse.
I think a better way to look at it is to think about ax^2 + bx^2 = c, or an ellipse being a stretched circle. Why the constant sum of distance definition and a stretched circle are the same thing has been my question for a while. (You can derived it with somewhat complicated equation, but I'm looking for an "intuitive" explanation on this.)
In this one, the little circle provides the right stretch vertically.
Oh, I forgot to mention that if you change the initial heading of one of these two ellipses in the setup script, you can get rotated ellipses. "Why" is still a good question.
Or, a parameterized notation of circle is:
x = cos(t), y = sin(t)
and a stretched one is:
x = a cos(t), y = b sin(t)
What this example is doing is to make x and y be sums of two circles that are going opposite way. So:
x = m cos(t) + n cos(-t), y = m sin(t) + n sin(-t)
x = (m + n) cos(t), y = (m - n) sin(t)
and because (m + n) and (m - n) are constants, it is an ellipse.
Ah, all empty lines are gone in the above comment. Sorry for that.
Anyway, this project is an explanation to the other "LocalEllipse" project, that tries to draw an ellipse with "turn by" and "forward by", but if we start from the parameterized notation, there is even much simpler way to draw an ellipse (proposed by Ichikawa-san when drawing an ellipse was a hot topic). This would be an assignment to readers ^^;
Website contents under a Creative Commons license.