Article 6XP1H Gardener’s ellipse

Gardener’s ellipse

by
John
from John D. Cook on (#6XP1H)

There are several ways to define an ellipse. If you want to write software draw an ellipse, it's most convenient to have a parametric form:

gardener3.svg

This gives an ellipse centered at (h, k), with semi-major axis a, semi-minor axis b, and with the major axis rotated by an angle from horizontal.

But if you're going to physically draw an ellipse, there's a more convenient definition: an ellipse is the set of points such that the sum of the distances to two foci is a constant s. This method is most often called the gardener's ellipse. It's also called the nails-and-string method, which is more descriptive.

gardener1.png

To draw an ellipse on a sheet of plywood, drive a nails in the plywood at both foci, and attach an end of a string of length s to each nail. Then put a pencil in the middle of the string and pull it tight. Keep the string tight as you move the pencil. This will draw an ellipse [1].

Presumably the name gardener's ellipse comes from the same idea on a larger scale, such as a gardener marking out an elliptical flower bed using two stakes in the ground and some rope.

Going back to drawing on a computer screen, there is a practical use for the gardener's ellipse: to determine whether a point is inside an ellipse, add the distance from the point to each of the foci of the ellipse. If the sum is less than s then the point is inside the ellipse. If the sum is greater than s the point is outside the ellipse.

gardener2.png

From parameters to nails and string

If you have the parametric form of an ellipse, how do you find the gardener's method representation?

To make it easier to describe points, set = 0 and h = k = 0 for a moment. Then the foci are at (c, 0) where c^2 = a^2 - b^2.

Since (a, 0) is a point on the string, you have to be able to draw it and so the string must stretch from the focus at (-c, 0) to the point (a, 0) and back to the focus at (c, 0). Therefore the length of the string is2a.

The length of the string depends on the major axis and not on the minor axis.

When we shift and rotate our ellipse, letting ,h, andk take on possibly non-zero values, we apply the same transformation to the foci.

gardener4.svg

Rotating and translating the ellipse doesn't change the length of the major axis, sos stays the same.

From nails and string to parameters

Draw a line between the two nails" (foci). The slope of this line is tan and it's midpoint is (h,k). The parameterc is half the length of the line.

The semimajor axis a is half the string lengths.

Once you knowa andc you can solve forb = (a^2 - c^2).

Related posts

[1] In practice, a carpenter might want to draw an ellipse a different way.

The post Gardener's ellipse first appeared on John D. Cook.
External Content
Source RSS or Atom Feed
Feed Location http://feeds.feedburner.com/TheEndeavour?format=xml
Feed Title John D. Cook
Feed Link https://www.johndcook.com/blog
Reply 0 comments