Rotated Ellipses And Their Intersections With Lines by ...

Rotated Ellipses

And Their Intersections With Lines

by

Mark C. Hendricks, Ph.D.

Copyright ? March 8, 2012

Abstract:

This paper addresses the mathematical equations for ellipses rotated at any angle and how

to calculate the intersections between ellipses and straight lines. The formulas for

calculating the intersection points are derived, and methods are given for plotting these

ellipses on a computer.

In addition, techniques are shown for determining tangents to (rotated) ellipses,

calculating the ellipse¡¯s bounding box, and finding its foci.

Table of Contents

Rotating Points

Rotating an Ellipse

Rotating an Ellipse More Than Once

Constructing (Plotting) an Ellipse

Constructing (Plotting) a Rotated Ellipse

Finding the Foci of an Ellipse

Intersection of Lines with a Rotated Ellipse

Intersection with a Horizontal Line

Intersection with a Vertical Line

Intersection of Rotated Ellipse with Sloping Line(s)

Bounding Box for a Rotated Ellipse

Determining the Tangent to an Ellipse

Determining the Tangent to a Rotated Ellipse

Approximating a Segment of an Ellipse with a Bezier Curve

Rotating Points

First, we will rotate a point (x1, y1) around the origin by an angle ¦Á.

55

50

y

(x,y)

45

40

35

r

30

y1

(x1 , y1 )

25

r

20

¦Á+¦Â

15

10

¦Á

5

5

10

¦Â

15

20

25

30

35

x

40

45

50

55

x1

If the point (x1, y1) is at angle ¦Â from the x-axis, then

x1 = r cos ¦Â

y1 = r sin ¦Â

After rotating the point by angle ¦Á, the new coordinates are

x = r cos(¦Â + ¦Á )

y = r sin (¦Â + ¦Á )

Applying the formulae for the sine and cosine of the sum of two angles,

x = r cos ¦Â cos ¦Á ? r sin ¦Â sin ¦Á = (r cos ¦Â )cos ¦Á ? (r sin ¦Â )sin ¦Á

y = r sin ¦Â cos ¦Á + r cos ¦Â sin ¦Á = (r sin ¦Â )cos ¦Á + (r cos ¦Â )sin ¦Á

or

x = x1 cos ¦Á ? y1 sin ¦Á

y = y1 cos ¦Á + x1 sin ¦Á

(1a)

(1b)

If you rotate that point around a ¡°center of rotation¡± at (e1, f1), you get

x = ( x1 ? e1 )cos ¦Á ? ( y1 ? f1 )sin ¦Á + e1

y = ( y1 ? f1 )cos ¦Á + ( x1 ? e1 )sin ¦Á + f1

(2a)

(2b)

Rotating an Ellipse

40

(x1 , y 1 )

v

30

(x, y)

¦Á

¦Á

h

20

(e 1 , f 1 )

10

-10

10

20

30

40

50

60

70

80

So if (x1, y1) is a point on the ellipse and (e1, f1) is the center of the ellipse (see above

figure), then equations (2) are true for all points on the rotated ellipse. The ¡°line¡± from

(e1, f1) to each point on the ellipse gets rotated by ¦Á.

To rotate an ellipse about a point (p) other then its center, we must rotate every point

on the ellipse around point p, including the center of the ellipse.

120

¦Á

100

(e, f)

80

60

(e 1, f1 )

40

¦Á

20

(p)

-40

-20

20

40

60

80

100

120

140

160

180

200

This is as if we put a pin in the graph at point p and rotated the entire sheet of paper

around the pin.

Here we are rotating the red ellipse centered at (e1 , f1) around point (p) by an angle ¦Á.

So, for every point (x1, y1) on the original ellipse, the rotated point is

x = ( x1 ? p x )cos ¦Á ? ( y1 ? p y )sin ¦Á + p x

y = ( y1 ? p y )cos ¦Á + ( x1 ? px )sin ¦Á + p y

and the rotated center is

e = (e1 ? p x )cos ¦Á ? ( f1 ? p y )sin ¦Á + p x

f = ( f1 ? p y )cos ¦Á + (e1 ? px )sin ¦Á + p y

So the directed line from the new center (e, f) to the rotated point (x, y) can be expressed

as

(x ? e ) = (x1 ? px ? e1 + px )cos ¦Á ? ( y1 ? p y ? f1 + p y )sin ¦Á

x = ( x1 ? e1 )cos ¦Á ? ( y1 ? f1 )sin ¦Á + e

( y ? f ) = ( y1 ? p y ? f1 + py )cos ¦Á + (x1 ? px ? e1 + px )sin ¦Á

y = ( y1 ? f1 )cos ¦Á + ( x1 ? e1 )sin ¦Á + f

which have the same form as equations (2) for the ellipse rotated around its center, except

that the new ellipse is centered at (e, f).

Note: If we are rotating about the center, then (p) = (e1 , f1) and (e, f) = (e1 , f1)

and we are back to equations (2).

Therefore, we can state that:

When an ellipse gets rotated by angle ¦Á about a point p other than its center, the

center of the ellipse gets rotated about point p and the new ellipse at the new

center gets rotated about the new center by angle ¦Á.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download