[Thread Prev] [Thread Next]
Dale wrote:
> > to ellipse :s :e
> > pd
> > local "n
> > make "n 0
> > repeat 360[rt :n fd :s lt :n lt :n fd :s * :e rt :n make "n :n + 1]
> > end
> >
> > I love it's simplicity.
>
> Daniel, this exact code is on page 440 of "Turtle Geometry: The Computer
as
> a Medium for Exploring Mathematics" by Harold Abelson and Andrea diSessa,
> 1980. Eighth paperback printing 1992.
>
> "15. The following program draws an ellipse with size parameter S and
> eccentricity (1 + E) / (1  E). It uses a variable, N, to keep track of
when
> to draw with high and when with low curvature. Techniques to prove this
> will be developed in chapter 3."
>
> I do not know if this is an ellipse or only an ellipse wannabe. Maybe
> differentiating the equation of an ellipse to find the changing
> slopes(curvature?) might be useful for understanding.
> ........
The program is also in "Turtle Geometry" Abelson and diSessa '82
There is another  but rather more complicated(!)  approach .
The usual method for making an elliptical shaped flower bed in the
garden is to use 3 sticks and a piece of string.
For any point on an ellipse the sum of its distances from
the foci is constant (as every student knows :)
Two turtles are used as the foci, another to draw the curve and a "scout" to
find the next point.
The scout starts from the last position plotted, moves out along the
(approx) tangent
and turns towards one of the foci. It moves forward until the sum of its
distances from the foci
is not greater than a fixed amount. That is the next point on the ellipse.
The plot is stopped when the plotting turtle has rotated thro' 360 degrees.
The advantage of this method is that the foci can be placed anywhere on the
screen.
A simulation of the movement of a planet should require the "planet" to
move faster the closer it is to the sun.
Mike
Attachment:
ellipse.mw2
Description: Binary data
Attachment:
ellipse.gif
Description: GIF image
Previous by thread:
Elliptical orbits for planets
Next by thread:
Elliptical orbits for planets
To save an attachment to your computer, PC users should rightclick (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the popup menu. A window will then pop up in which you can choose a location for the file.
