- #1
ktoz
- 171
- 12
- TL;DR Summary
- ellipse circumference = 4 * sqrt(minor^2(pi^2/4 - 1) + major^2)
While fighting a CAD program, today, I might have stumbled on a potential way to easily calculate the circumference of an ellipse. I checked my method against a half a dozen online ellipse calculators and while my formula gives different results, I can't see where I'm making any logical errors. Perhaps someone can take a look and see if they can spot the error(s).
Basically the method starts with the realization that if you cut a cylinder with an angled plane, the resulting face is an ellipse. Given that, its possible to construct a cylinder that naturally fits any given ellipse. From there, the length of one quadrant of the ellipse is just a matter of getting the length of the hypotenuse of a triangle wrapped around the cylinder and multiplying by 4.
Given
a = minor radius
b = major radius
The wrapped quadrant triangle can be computed like this
Use the minor radius as the radius of the wrapping cylinder
triangle base length, q = pi * a / 2
Use the major radius as the hypotenuse of a triangle that starts at the center of the cylinder base
and intersects the cylinder face above the base
quad triangle height, h = sqrt(b^2 - a^2)
Compute the hypotenuse of the wrapped quad triangle
triangle hypotenuse, c = sqrt(q^2 + h^2)
Multiply by 4 to get the circumference
ellipse circumference = 4 * c
Wrap it all together, simplify and you get the following formula
ellipse circumference = 4 * sqrt(a^2(pi^2/4 - 1) + b^2)
I checked out several examples in a CAD program and, at least to the resolution of the program, the ellipses constructed by cutting derived cylinders in the above way, all matched perfectly.
As I said at the start, this formula gives a different answer than online calculators that use more advanced methods, but the concept is so simple, I don't see where I might be going wrong.
Does the logic hold up? Or does someone see my error(s)?
Basically the method starts with the realization that if you cut a cylinder with an angled plane, the resulting face is an ellipse. Given that, its possible to construct a cylinder that naturally fits any given ellipse. From there, the length of one quadrant of the ellipse is just a matter of getting the length of the hypotenuse of a triangle wrapped around the cylinder and multiplying by 4.
Given
a = minor radius
b = major radius
The wrapped quadrant triangle can be computed like this
Use the minor radius as the radius of the wrapping cylinder
triangle base length, q = pi * a / 2
Use the major radius as the hypotenuse of a triangle that starts at the center of the cylinder base
and intersects the cylinder face above the base
quad triangle height, h = sqrt(b^2 - a^2)
Compute the hypotenuse of the wrapped quad triangle
triangle hypotenuse, c = sqrt(q^2 + h^2)
Multiply by 4 to get the circumference
ellipse circumference = 4 * c
Wrap it all together, simplify and you get the following formula
ellipse circumference = 4 * sqrt(a^2(pi^2/4 - 1) + b^2)
I checked out several examples in a CAD program and, at least to the resolution of the program, the ellipses constructed by cutting derived cylinders in the above way, all matched perfectly.
As I said at the start, this formula gives a different answer than online calculators that use more advanced methods, but the concept is so simple, I don't see where I might be going wrong.
Does the logic hold up? Or does someone see my error(s)?
Last edited: