Skip to content

07. Ellipse and other Curves

Dated: 15-04-2025

Ellipse

cs602_e_7_1.svg

Ellipse

\[|\overline{O V_2}| = |\overline{O V_1}| = a\]
\[|\overline{O V_2^\prime}| = |\overline{O V_1^\prime}| = b\]
\[|\overline{O F_2}| = |\overline{O F_1}| = c\]
\[|r_1 + r_2| = 2c\]

History

  • The ellipse was first studied by Menaechmus.
  • It was further investigated by Euclid and later named by Apollonius.
  • The concepts of focus and conic section directrix of an ellipse were studied by Pappus.
  • In 1602, Kepler believed that the orbit of Mars was oval.
  • He later discovered it was an ellipse with the Sun at one focus.
  • Kepler introduced the word "focus" and published his findings in 1609.
  • In 1705, Halley showed that the comet now named after him follows an elliptical orbit around the Sun.
  • An ellipse rotated about its minor axis gives an oblate spheroid.
  • An ellipse rotated about its major axis gives a prolate spheroid.

\[\frac {x^2}{a^2} + \frac{y^2}{b^2} = 1\]

Assuming \(a > b\), \(b\) is called the semi minor axis and \(a\) is called the semi major axis.
In general,
Equation of an ellipse centered at \((x_0, y_0)\) is

\[\frac {(x - x_0)^2}{a^2} + \frac{(y - y_0)^2}{b^2} = 1\]

Ellipse Drawing Techniques

\[\frac {x^2}{a^2} + \frac{y^2}{b^2} = 1\]
\[\implies b^2x^2 + a^2 y^2 = a^2b^2\]
\[f_{\text{ellipse}} = b^2x^2 + a^2 y^2 - a^2b^2\]

Let's assume \(a > b\) and accordingly, \(r_x = a\) and \(r_y = b\).

\[f_{\text{ellipse}} = r_y^2x^2 + r_x^2 y^2 - r_x^2r_y^2\]
\[f_{\text{ellipse}} = \begin{cases} < 0 & \text{if } (x, y) \text{ is inside the ellipse boundary} \\ = 0 & \text{if } (x, y) \text{ is on the ellipse boundary} \\ > 0 & \text{if } (x, y) \text{ is outside the ellipse boundary} \\ \end{cases} \]

Starting from \((0, r_y)\), we step using \(x\) where \(y\) is determined by decision function.
When slope1 \(m = -1\), we switch the stepping from \(x\) to \(y\).
The slope1 of the ellipse can be figured out by using

\[\frac{dy}{dx} = - \frac{r_y^2x^2}{r_x^2y^2}\]

The boundary where we switch stepping, is determined by \(\frac {dy}{dx} = -1\).
This gives us

\[r_y^2x^2 = r_x^2y^2\]

we will switch the stepping whenever

\[r_y^2x^2 \ge r_x^2y^2\]

Similar to previous lecture, for region 1, if \(P_k < 0\) then \(y_{k + 1} = yk\) otherwise, \(y_{k + 1} = y_k - 1\).

\[P_{k + 1} = P_k + 2r_y^2(x_k + 1) + r_y^2 \quad \text{where } P_k < 0\]
\[P_{k + 1} = P_k + 2r_y^2(x_k + 1) + r_y^2 - 2r_x^2(y_k - 1)\quad \text{where } P_k > 0\]

For our stating point \(P_0\), we will put \((0, r_y)\),

\[P_0 = r_y^2 - r_x^2r_y + \frac 1 4 r_x^2\]

Similarly, for region 2

\[P_{k + 1}^\prime = P_k^\prime - 2 r_x^2(y_k + 1) + r_x^2 \quad \text{where } P_k^\prime > 0\]
\[P_{k + 1}^\prime = P_k^\prime + 2 r_y^2(x_k + 1) + r_x^2 - 2r_x^2y_k \quad \text{where } P_k^\prime < 0\]

Our starting point \(P_0^\prime\) will be the last point computed in region 1.

\[P_0^\prime = r_y^2 \left(x_0 + \frac 1 2\right) + r_x^2(y_0 - 1)^2 - r_x^2r_y^2\]
MidPointEllipse(xcenter, ycenter, rx, ry):
    x = 0
    y = ry

    do {
        DrawSymmetricPoints (xcenter, ycenter, x, y)

        R1_P0 = ry**2 - rx**2 * ry + rx**2 * 1 / 4

        if (R1_Pk < 0) {
            R1_Pk_next = R1_Pk + 2ry**2 * (xk + 1) + ry**2
        }
        else {
            R1_Pk_next = R1_Pk + 2ry**2 * (xk + 1) + ry**2 - 2rx**2 * (yk - 1)
        }

        R2_P0 = ry**2 * (x0 + 1 / 2) + rx**2 * (y0 - 1)**2 - rx**2 * ry**2

        y++

        if (R2_Pk > 0) {
            R2_Pk_next = R2_PK - 2rx**2 * (yk + 1) + rx**2
        }
        else {
            R2_Pk_next = R2_PK - 2rx**2 * yk + rx**2 + 2ry**2 (xk + 1)
        }
        x++
    } while (ry**2 * x**2 >= rx**2 * y**2);
}

Other Curves

Various curves are useful for

  • Object Modeling
  • Animation path specifications
  • Data and function2 graphing
  • Graphics applications

Commonly encountered curves include

  • Conics
  • Trigonometric
  • Exponential
  • Probability distributions
  • General polynomials
  • Splines

Conic Sections

The general equation for a conic section is

\[Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0\]

Type of the section can be found using

\[B^2 - 4AC\]
  • \(< 0\)
  • \(= 0\)
    • parabola
    • 2 parallel lines
    • 1 line
    • no curve
  • \(> 0\)
    • hyperbola
    • 2 intersecting lines
Circle Ellipse Parabola Hyperbola
Equation (horizontal vertex) \(x^2 + y^2 = r^2\) \(\frac{x^2}{a^2}+\frac{y^2}{b^2} = 1\) \(4px = y^2\) \(\frac{x^2}{a^2}-\frac{y^2}{b^2} = 1\)
Equations of Asymptotes \(y = \pm x \left(\frac b a\right)\)
Equation (vertical vertex) \(x^2 + y^2 = r^2\) \(\frac{y^2}{a^2}+\frac{x^2}{b^2} = 1\) \(4py = x^2\) \(\frac{y^2}{a^2}-\frac{x^2}{b^2} = 1\)
Equations of Asymptotes \(x = \pm y \left(\frac b a\right)\)
Variables \(r =\) circle radius \(a=\) major radius, \(b=\) minor radius, \(c=\) distance from center to focus \(p =\) distance from vertex to focus or directrix \(a=\frac 1 2\) length of major axis, \(b=\frac 1 2\) length of minor axis, \(c=\) distance from center to focus
Eccentricity \(0\) \(\frac c a\) \(\frac c a\)
Relation to Focus \(p = 0\) \(a^2 - b^2 = c^2\) \(p = p\) \(a^2 + b^2 = c^2\)
Definition: locus of points meeting the condition distance to the origin is constant sum of distances to each focus is constant distance to focus = distance to directrix difference between distances to each foci is constant

Hyperbola

Set4 of all points, whose difference of distances from 2 fixed points (the foci) is constant, is called a hyperbola.

cs602_e_7_2.svg

(Rough sketch of a) hyperbola with center \(O\), foci (\(F_1, F_2\)) and vertices (\(V_1, V_2\)).

\[\overline{V_1V_2} = \text{Transverse Axis}\]

Equation

Horizontal Transverse Axis

Centered at \((0, 0)\)
\[\frac{x^2}{a^2} - \frac{y^2}{b^2} = 1\]
Centered at \((h, k)\)
\[\frac{(x - h)^2}{a^2} - \frac{(y-k)^2}{b^2} = 1\]

Vertical Transverse Axis

Centered at \((0, 0)\)
\[\frac{y^2}{a^2} - \frac{x^2}{b^2} = 1\]
Centered at \((h, k)\)
\[\frac{(y-k)^2}{a^2} - \frac{(x-h)^2}{b^2} = 1\]

If \(c = |\overline{FO}|\) and \(a = |\overline{VO}|\) then

\[b^2 = c^2 - a^2\]

Eccentricity \(e\) is given by

\[e = \frac c a\]

For hyperbola, \(e > 1\) and for ellipse, \(1 \ge e > 0\)

The coordinates of the corners of the rectangle shown in the figure are

\[(h \pm a, k \pm b)\]

and the dotted lines passing through these corners are called asymptotes, bounding both branches of the hyperbola.

Slope1 is given by

\[\frac b a\]

The equations for the asymptotes are

For horizontal hyperbola
\[y = k \pm \frac b a (x - h)\]
For vertical hyperbola
\[y = k \pm \frac a b (x - h)\]

Also, the line5 joining both ends of the rectangle, passing through the center and perpendicular to the axis is called conjugate axis.

Parabola

It is defined as set4 of points which are equidistant from a line5 called directrix and a fixed point called focus which isn't on directrix.
The midpoint between directrix and focus is called the vertex.
The line passing through focus and vertex is called the axis.

Although parabola looks like one of the branches of hyperbola, it is not quite the case.

Equations for parabolas with vertex at \((h, k)\) are given by

For horizontal parabola
\[(y - k)^2 = 4p(x - h)\]
For vertical parabola
\[(x - h)^2 = 4p(y - k)\]

Rotations of Axes

The \(B\) term in the general equation

\[Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0\]

controls rotation.

Animated Applications

Ellipses, hyperbolas and parabolas are useful for describing orbital motions in context of following forces.

  • Gravitational
  • Electromagnetic
  • Nuclear

Parabolic Reflectors

  • Car headlights
  • Telescope mirrors
  • Antennas

Elliptical Orbits

Sun being one of the foci was noted by Apollonius in 2nd century and was later studied by Kepler rigorously.
The eccentricity of the following orbits are

  • \(0.0167\) for earth
  • \(0.2481\) for pluto (highest in all planets)

Whispering Galleries

In United States capital, St. Paul's Cathedral has one of the rooms with an elliptical ceiling which allows two people standing at different foci of the ellipse hear each other very closely.

Polynomials and Spline Curves

\[y = \sum_{i = 0}^n a_ix^i\]
\[y = a_0x^0 + a_1x^1 + \ldots + a_nx^n\]

Applications involve

  • Design of object shapes
  • Specifications of animation paths
  • Graphing of data trends in a discrete set of data points

To design object shapes or motion paths, a few key points are chosen to outline the curve, then polynomial fitting is applied.
A common approach uses cubic polynomial segments between each pair of points, defined parametrically as:

\[x(u)=ax0+ax1u+ax2u2+ax3u3x(u) = a_{x0} + a_{x1}u + a_{x2}u^2 + a_{x3}u^3\]
\[y(u)=ay0+ay1u+ay2u2+ay3u3y(u) = a_{y0} + a_{y1}u + a_{y2}u^2 + a_{y3}u^3\]

where \(u \in [0,1]u \in [0, 1]\).

cs602_e_7_3.svg

References


  1. Read more about slopes

  2. Read more about functions

  3. Read more about circle

  4. Read more about sets

  5. Read more about lines