0% found this document useful (0 votes)
27 views2 pages

10 - Lec06 - Ch08 Qudratic Form Ellipse Example

This document summarizes the steps to plot an ellipse defined by a quadratic equation in y1-y2 space, and then map those points to the original x1-x2 space. It describes: 1) Generating 161 evenly spaced points in y1 from -8 to 8 and calculating the corresponding y2 values. 2) Plotting the y1-y2 points to visualize the ellipse. 3) Mapping the y1-y2 points to x1-x2 space using an orthonormal transformation matrix X. 4) Plotting the transformed x1-x2 points and y-axes to show the ellipse in the original coordinate space.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views2 pages

10 - Lec06 - Ch08 Qudratic Form Ellipse Example

This document summarizes the steps to plot an ellipse defined by a quadratic equation in y1-y2 space, and then map those points to the original x1-x2 space. It describes: 1) Generating 161 evenly spaced points in y1 from -8 to 8 and calculating the corresponding y2 values. 2) Plotting the y1-y2 points to visualize the ellipse. 3) Mapping the y1-y2 points to x1-x2 space using an orthonormal transformation matrix X. 4) Plotting the transformed x1-x2 points and y-axes to show the ellipse in the original coordinate space.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Quadratic Form Example - Ellipse

Roger Bradshaw, ME 565


Plot the case from the book and slides corresponding to the ellipse

becomes

This is defined for the domain [-8, 8] for y1. Lets plot 160 points in y1-y2 space - note that the y2 points are +/- pairs.
(i.e. if y2 = 1 is a solution then y2 = -1 is also a solution due to the exponent 2 in the ellipse equation).

Rearrange the equation to find y2 given y1 as:


2 2
y2 ( y1) 2 1
y1
y2a ( y1) 2 1
y1
For this y1 there is another solution
8 8
Now create points that we can plot i 0 160 y1i 0.1 i 8 y2pi y2 y1i y2m i y2a y1i
161 points 161 y1 points 161 y2 points >= 0 161 y2 points <= 0

We can plot these in y1-y2 space to see it is an ellipse - note that -2 <= y2 <= 2 (used below)

Plot Of Solution In y1-y2 Space


3

y2p i
y2

0
y2mi

2
Pos y2 Solution
Neg y2 Solution
3
9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9
y1i

y1
However, what we really want to see is the shape in the x1-x2 space (how we were given the equation). Recall from the notes
that we have the relationship between the y vector and the x vector is y = XT x. Since X is orthonormal, we can also say that
X-1 = XT so y = X-1 x. Then multiply both sides by X to find x = X y. Hence, we can take the points above as a vector y and
determine where those points are in x.

For example, the 31st point above (arbitrary) on the positive y2 side is:
(note 31st since MathCad indexes first point as subscript 0)
y130 5
y130 5 y2p30 1.561 which we can combine as a vector as yv yv
y2p30 1.561
Where is this point in the x1-x2 space? Define the X matrix as given above and use it to find x:

1 1 1 2.432
X xv X yv xv
2 1 1 4.64
T 5
Alternately if we were given x we could find its associated y using XT: X xv This recovers y above
1.561
Now map every point y1-y2 point above into a corresponding x1-x2 point:

x1pi y1i x1mi y1i


X This is for the positive y2 points X This is for the negative y2 points
x2pi y2pi x2mi y2mi
Now lets also map points that correspond to the y1-y2 axes. For y1 axis, y2 = 0 while for y2 axis y1 = 0. So we have:
Same 161 points that 4 161 points evenly spaced
y1axi y1i we started with for y1 y2axi 2 i along -2 <= y2 <= 2 Nulli 0 0 vector
160
The y1 axis x1y1axi y1axi The y2 axis x1y2axi Nulli
is then given by X is then given by X
(i.e. for [y1 0]T) x2y1axi Nulli (i.e. for [0 y2]T) x2y2axi y2axi

NOTE
Plot Of Solution In x1-x2 Space
7 In this view, I have plotted the graph
6
such that each side is equal length.

5 This leads to the y1 and y2 axes


appearing normal to each other
4 in the x1-x2 space (which they are).
3
We can show this as:
x2p i 2
y1 unit vector mapped to x
x2mi 1
1 0.707
x1y1 X x1y1
x2

x2y1axi 0
0 0.707
x2y2axi 1
y2 unit vector mapped to x
2
0 0.707
3
x1y2 X x1y2
1 0.707
4 Pos y2 Solution T
Neg y2 Solution x1y1 x1y2 0 They are orthogonal
5
y1 Axis Note that y1 unit vector mapped to x
6 y2 Axis is simply the first eigenvector.
7
7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 Similarly the y2 unit vector mapped to x
x1p i x1mi x1y1axi x1y2axi is simply the second eigenvector.
x1 Hence the eigenvectors are the y axes

You might also like