Joe Bartok
02-06-2010, 07:25 AM
I found the following visitor message (sorry to say, it's about two months old) in my "Inbox":
"Joe,
Can you tell me why there is a differece between a ellipse layout and an Oval laout when the major and minor axis' start the same. I cut out some ellipses for window trim and the dimensions lost an 1/8" near the tight curve. Thank you"
The simple answer is that there are no parallel ellipses. The detailed answer is somewhat lengthier. A few months ago a video game programmer asked me this same question. The following is the text of my response (I've deleted names for the sake of privacy). Also, while the "Googlepages" calculator and images are intact, the "Geocities" link is now defunct, I've attached relevant images that web page(s) to this post.
"I think we’re on the same page now. I was initially confused by your circle “rolling along the ellipse”. My thinking was that we’re looking a the curve traced by a given point on the circle. I think I’m reading you correctly now in that we’re tracking the diameter of the circle, such that we are always a fixed distance or parallel to the ellipse.
First I’ll do a breakdown of the steps involved in finding a point on this curve using the calculator default values.
http://joe.bartok.googlepages.com/plot_oval_calculator.htm (http://joe.bartok.googlepages.com/plot_oval_calculator.htm)
Major Axis 2a = 60
Semi-Major Axis a = 30
Minor Axis 2b = 40
Semi-Minor Axis a = 20
Distance of parallel curve from ellipse d = 14
x (ellipse) = 22
Therefore y (ellipse) = 20×√(30² – 22²)/30 = 13.597385
We need to define what we mean by “parallel”. If two straight lines are parallel the distance between them, measured along a perpendicular between the lines, is fixed or constant. If two circles are concentric they may also be considered parallel. The radii are always at right angles to the tangents or slopes of the circles, and the difference between the radii from the common center is constant. A perpendicular to a curve (in this case the radii of the circles) is called the normal. I’m going to adhere to this concept of “parallel” when solving for the parallel oval to the ellipse.
The formula for the tangent of an ellipse is given in one of the attached images and this link:
http://ca.geocities.com/web_sketches/ellipse_notes/ellipse_slope/ellipse_slopes.html (http://ca.geocities.com/web_sketches/ellipse_notes/ellipse_slope/ellipse_slopes.html)
For our example at the selected point:
Tangent = – (20² × 22)/(30² × 13.597385) = – .719093
The equation of the normal is the negative reciprocal of the tangent (remember this from graphing and solving straight lines in Cartesian co-ordinates in high school?). So to calculate the normal we can eliminate the negative sign and use the reciprocal of the equation of the tangent.
Normal = (30² × 13.597385)/(20² × 22) = 1.390642
Next we need the angle of the normal with respect to the x-axis:
Normal Slope Angle (shown as φ in the calculator) = arctan 1.390642 = 54.280372°
We have a line dead perpendicular to the ellipse at a known point, we have a distance or length to the parallel curve, and we have an angle. Conversion of polar co-ordinates … a line or radius vector (r) at a given angle (θ) … to rectangular co-ordinates is achieved by the relations:
x = r cos θ
y = = r sin θ
Now we’re all set to determine the point on our parallel oval:
x(oval) = x(ellipse) + d cos (Normal Slope Angle)
y(oval) = y(ellipse) + d sin (Normal Slope Angle)
Substituting our known values in the equations:
x(oval) = 22 + 14 × cos 54.280372° = 30.173471
y(oval) = 13.597385 + 14 × sin 54.280372° = 24.963755
I hope you don’t mind but I’m going to skip explaining how the Javascript crunches the arc length (the 32.000141 returned in the last field). It’s going to take too long to explain with text and isn’t relevant to finding the point on the oval. Ditto for the “y-intercept of Normal” (-16.996732) … this for the purpose of finding the Cartesian equation of the normal.
Those are the steps, you asked for a formulation. My suggestion is to begin with the parametric equations for the oval above and use the parametric equations of the ellipse as well. Where the major axis lies on the x-axis …
Parametric Equations of the Ellipse:
x = R cos (Eccentric Angle) … R = Semi-Major Axis = 30
y = = r sin (Eccentric Angle) … r = Semi-Minor Axis = 20
Scroll down the link below and you’ll see what is meant by the “eccentric angle” of the ellipse (and if you are interested, how to solve the equations for the tangent of the ellipse from first principles):
http://ca.geocities.com/web_sketches/ellipse_notes/ellipse_slope/ellipse_slope_formula.html (http://ca.geocities.com/web_sketches/ellipse_notes/ellipse_slope/ellipse_slope_formula.html)
Substituting for x(ellipse) and y(ellipse) in the equation of the parallel oval:
x(oval) = R cos (Eccentric Angle) + d cos (Normal Slope Angle)
y(oval) = r sin (Eccentric Angle) + d sin (Normal Slope Angle)
An awkward pair of equations to work with since two different angles are referenced. And it seems we’ll be jumping from the frying pan into the fire because if we substitute the equation of the Normal Slope within the parentheses we see that the x’s and y’s in the equation of the normal are mixed. So the next move is to express the normal in terms of the parametric equations of the ellipse, the formula now looks like this:
Normal = (R² × r sin (Eccentric Angle))/(r² × R cos (Eccentric Angle))
Cancelling like terms in the numerator and denominator:
Normal = (R sin (Eccentric Angle))/(r cos (Eccentric Angle))
And since sin (Eccentric Angle)/cos (Eccentric Angle) = tan (Eccentric Angle):
Normal = R tan (Eccentric Angle)/r
One more step … the parametric equations of the oval call for the sine and cosine of the Normal Slope Angle, not the normal itself:
Normal Slope Angle = arctan (R tan (Eccentric Angle)/r)
So here’s the final version of the parametric equations of the parallel oval, neatly expressed in terms of variables defining the parent ellipse. I have also attached an image file with the following formulas:
x(oval) = R cos (Eccentric Angle) + d cos (arctan (R tan (Eccentric Angle)/r))
y(oval) = r sin (Eccentric Angle) + d sin (arctan (R tan (Eccentric Angle)/r))
Let’s test drive the formulas. I’m going to stay with the values that will produce the same x’s and y’s used thus far so you can see that the equations of the oval return the same results. The eccentric angle for our working point on the ellipse is:
Eccentric Angle = arccos (x/R) = arccos (22/30) = 42.83343°
Eccentric Angle = arcsin (y/r) = arcsin (13.597385/20) = 42.83343°
Let’s substitute our values for the semi-axes, eccentric angle and distance of the parallel oval:
x(oval) = 30 × cos 42.83343° + 14× cos (arctan (30 × tan 42.83343°/20)) = 30.17347
y(oval) = 20 × sin 42.83343° + 14 × sin (arctan (30 × tan 42.83343°/20)) = 24.96376
I tested these parametric equations in my graphing calculator. They work fine in the first quadrant but going counter-clockwise past the y-axis produces rather odd results (the trig functions change sign in quadrants). This is not a problem … we can plot the curve in the first quadrant and mirror image it about the axes.
I hope you are still awake after reading this lengthy exposition and that I’ve typed it up correctly (math I’m O.K. with but my typing and proof reading skills could use some improvement LOL). My graphics were produced over a span of several years without cross referencing, so variables such as phi and r are used in different contexts in from one drawing to another. If this causes confusion and you have problems following the math let me know.
I worked out the math and wrote the code to for the purpose of laying out a frame for a mirror just like in the example I gave you, or an arch over an elliptical window. Just curious, so don’t feel obligated to respond, but why do you need this parallel oval formula?
Enjoy and have fun …"
"Joe,
Can you tell me why there is a differece between a ellipse layout and an Oval laout when the major and minor axis' start the same. I cut out some ellipses for window trim and the dimensions lost an 1/8" near the tight curve. Thank you"
The simple answer is that there are no parallel ellipses. The detailed answer is somewhat lengthier. A few months ago a video game programmer asked me this same question. The following is the text of my response (I've deleted names for the sake of privacy). Also, while the "Googlepages" calculator and images are intact, the "Geocities" link is now defunct, I've attached relevant images that web page(s) to this post.
"I think we’re on the same page now. I was initially confused by your circle “rolling along the ellipse”. My thinking was that we’re looking a the curve traced by a given point on the circle. I think I’m reading you correctly now in that we’re tracking the diameter of the circle, such that we are always a fixed distance or parallel to the ellipse.
First I’ll do a breakdown of the steps involved in finding a point on this curve using the calculator default values.
http://joe.bartok.googlepages.com/plot_oval_calculator.htm (http://joe.bartok.googlepages.com/plot_oval_calculator.htm)
Major Axis 2a = 60
Semi-Major Axis a = 30
Minor Axis 2b = 40
Semi-Minor Axis a = 20
Distance of parallel curve from ellipse d = 14
x (ellipse) = 22
Therefore y (ellipse) = 20×√(30² – 22²)/30 = 13.597385
We need to define what we mean by “parallel”. If two straight lines are parallel the distance between them, measured along a perpendicular between the lines, is fixed or constant. If two circles are concentric they may also be considered parallel. The radii are always at right angles to the tangents or slopes of the circles, and the difference between the radii from the common center is constant. A perpendicular to a curve (in this case the radii of the circles) is called the normal. I’m going to adhere to this concept of “parallel” when solving for the parallel oval to the ellipse.
The formula for the tangent of an ellipse is given in one of the attached images and this link:
http://ca.geocities.com/web_sketches/ellipse_notes/ellipse_slope/ellipse_slopes.html (http://ca.geocities.com/web_sketches/ellipse_notes/ellipse_slope/ellipse_slopes.html)
For our example at the selected point:
Tangent = – (20² × 22)/(30² × 13.597385) = – .719093
The equation of the normal is the negative reciprocal of the tangent (remember this from graphing and solving straight lines in Cartesian co-ordinates in high school?). So to calculate the normal we can eliminate the negative sign and use the reciprocal of the equation of the tangent.
Normal = (30² × 13.597385)/(20² × 22) = 1.390642
Next we need the angle of the normal with respect to the x-axis:
Normal Slope Angle (shown as φ in the calculator) = arctan 1.390642 = 54.280372°
We have a line dead perpendicular to the ellipse at a known point, we have a distance or length to the parallel curve, and we have an angle. Conversion of polar co-ordinates … a line or radius vector (r) at a given angle (θ) … to rectangular co-ordinates is achieved by the relations:
x = r cos θ
y = = r sin θ
Now we’re all set to determine the point on our parallel oval:
x(oval) = x(ellipse) + d cos (Normal Slope Angle)
y(oval) = y(ellipse) + d sin (Normal Slope Angle)
Substituting our known values in the equations:
x(oval) = 22 + 14 × cos 54.280372° = 30.173471
y(oval) = 13.597385 + 14 × sin 54.280372° = 24.963755
I hope you don’t mind but I’m going to skip explaining how the Javascript crunches the arc length (the 32.000141 returned in the last field). It’s going to take too long to explain with text and isn’t relevant to finding the point on the oval. Ditto for the “y-intercept of Normal” (-16.996732) … this for the purpose of finding the Cartesian equation of the normal.
Those are the steps, you asked for a formulation. My suggestion is to begin with the parametric equations for the oval above and use the parametric equations of the ellipse as well. Where the major axis lies on the x-axis …
Parametric Equations of the Ellipse:
x = R cos (Eccentric Angle) … R = Semi-Major Axis = 30
y = = r sin (Eccentric Angle) … r = Semi-Minor Axis = 20
Scroll down the link below and you’ll see what is meant by the “eccentric angle” of the ellipse (and if you are interested, how to solve the equations for the tangent of the ellipse from first principles):
http://ca.geocities.com/web_sketches/ellipse_notes/ellipse_slope/ellipse_slope_formula.html (http://ca.geocities.com/web_sketches/ellipse_notes/ellipse_slope/ellipse_slope_formula.html)
Substituting for x(ellipse) and y(ellipse) in the equation of the parallel oval:
x(oval) = R cos (Eccentric Angle) + d cos (Normal Slope Angle)
y(oval) = r sin (Eccentric Angle) + d sin (Normal Slope Angle)
An awkward pair of equations to work with since two different angles are referenced. And it seems we’ll be jumping from the frying pan into the fire because if we substitute the equation of the Normal Slope within the parentheses we see that the x’s and y’s in the equation of the normal are mixed. So the next move is to express the normal in terms of the parametric equations of the ellipse, the formula now looks like this:
Normal = (R² × r sin (Eccentric Angle))/(r² × R cos (Eccentric Angle))
Cancelling like terms in the numerator and denominator:
Normal = (R sin (Eccentric Angle))/(r cos (Eccentric Angle))
And since sin (Eccentric Angle)/cos (Eccentric Angle) = tan (Eccentric Angle):
Normal = R tan (Eccentric Angle)/r
One more step … the parametric equations of the oval call for the sine and cosine of the Normal Slope Angle, not the normal itself:
Normal Slope Angle = arctan (R tan (Eccentric Angle)/r)
So here’s the final version of the parametric equations of the parallel oval, neatly expressed in terms of variables defining the parent ellipse. I have also attached an image file with the following formulas:
x(oval) = R cos (Eccentric Angle) + d cos (arctan (R tan (Eccentric Angle)/r))
y(oval) = r sin (Eccentric Angle) + d sin (arctan (R tan (Eccentric Angle)/r))
Let’s test drive the formulas. I’m going to stay with the values that will produce the same x’s and y’s used thus far so you can see that the equations of the oval return the same results. The eccentric angle for our working point on the ellipse is:
Eccentric Angle = arccos (x/R) = arccos (22/30) = 42.83343°
Eccentric Angle = arcsin (y/r) = arcsin (13.597385/20) = 42.83343°
Let’s substitute our values for the semi-axes, eccentric angle and distance of the parallel oval:
x(oval) = 30 × cos 42.83343° + 14× cos (arctan (30 × tan 42.83343°/20)) = 30.17347
y(oval) = 20 × sin 42.83343° + 14 × sin (arctan (30 × tan 42.83343°/20)) = 24.96376
I tested these parametric equations in my graphing calculator. They work fine in the first quadrant but going counter-clockwise past the y-axis produces rather odd results (the trig functions change sign in quadrants). This is not a problem … we can plot the curve in the first quadrant and mirror image it about the axes.
I hope you are still awake after reading this lengthy exposition and that I’ve typed it up correctly (math I’m O.K. with but my typing and proof reading skills could use some improvement LOL). My graphics were produced over a span of several years without cross referencing, so variables such as phi and r are used in different contexts in from one drawing to another. If this causes confusion and you have problems following the math let me know.
I worked out the math and wrote the code to for the purpose of laying out a frame for a mirror just like in the example I gave you, or an arch over an elliptical window. Just curious, so don’t feel obligated to respond, but why do you need this parallel oval formula?
Enjoy and have fun …"