Download PDF file

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Classical Hamiltonian quaternions wikipedia , lookup

Cartesian coordinate system wikipedia , lookup

Line (geometry) wikipedia , lookup

Mathematics of radio engineering wikipedia , lookup

Cartesian tensor wikipedia , lookup

Bra–ket notation wikipedia , lookup

Basis (linear algebra) wikipedia , lookup

Linear algebra wikipedia , lookup

Transcript
4-13-2008
Coordinate Transformations
A coordinate transformation of the plane is a function f : R2 → R2 . I’ll usually assume that f has
continuous partial derivatives, and that f is “essentially” one-to-one in the region of interest. (A function is
one-to-one if different inputs produce different outputs.)
A coordinate transformation will usually be given by an equation (x, y) = f (u, v). You can think of it
as deforming or moving things in the u-v plane and placing them in the x-y plane.
y
v
x
u
I’m going to look at some important special cases.
1. Linear transformations. You know that a linear transformation R2 → R2 has the form
x
a b
u
=
.
y
c d
v
a, b, c, and d are numbers. In equation form, this is
x = au + bv,
y = cu + dv.
“Linear transformation” is long to write and say, so I’ll often use linear map for short.
Linear maps always leave the origin fixed, since u = 0, v = 0 gives x = 0, y = 0. (This is another way
of saying that linear maps take the zero vector to the zero vector.) And as you might expect, linear maps
carry lines to lines.
Moreover, a linear map takes squares to parallelograms:
v
y
u
For example, look at what happens to the
a
c
a
c
x
unit square 0 ≤ u ≤ 1, 0 ≤ v ≤ 1:
b
1
a
=
d
0
c
b
0
b
=
d
1
d
The vectors h1, 0i, h0, 1i determine the unit square. They are mapped to the vectors ha, ci, hb, di, two
adjacent sides of the parallelogram.
1
2. Translations. A translation R2 → R2 has the form
x
u
e
=
+
.
y
v
f
e and f are numbers. This translation just translates everything by the vector he, f i.
y
v
<e,f>
u
x
A translation by a nonzero vector is not a linear map, because linear maps must send the zero vector
to the zero vector. However, translations are very useful in performing coordinate transformations. I’ll
introduce the following terminology for the composite of a linear transformation and a translation.
Definition. Let A be a real m × n matrix. An affine map is a function f : Rn → Rm of the form
where x ∈ Rn
f (x) = Ax + b,
and b ∈ Rm .
Example. Find an affine map which carries the unit square 0 ≤ u ≤ 1, 0 ≤ v ≤ 1 to the parallelogram in
the x-y plane with vertices A(2, −1), B(5, 3), C(4, −6), D(7, −2).
I’m going to make a rough sketch of the parallelogram first. I want to know the orientation of the
vertices — e.g. that B and C are next to A, and that D is opposite A.
y
B
x
A
D
C
I’m going to do the transformation in two steps. First, I’ll take the square to a parallelogram which is
the right size and shape, but which has a corner at the origin. Next, I’ll move the parallelogram so it’s at
the right place.
2
−−
→
−→
The vectors from A to B and to C are AB = h3, 4i and AC = h2, −5i. I saw above that if I construct a
matrix with h3, 4i as the first column and h2, −5i as the second column, then it will multiply h1, 0i to h3, 4i
and h0, 1i to h2, −5i:
3 2
1
3
3 2
0
2
=
=
4 −5
0
4
4 −5
1
−5
So the following transformation takes the unit square to a parallelogram of the right shape:
x
3 2
u
=
.
y
4 −5
v
This transformation takes (0, 0) to (0, 0); I want (0, 0) to go to the point A (which I used as the base
point for my two vectors). To fix this, just translate by A:
2
x
3 2
u
+
.
=
v
−1
y
4 −5
3. Rotations. A rotation counterclockwise through an angle θ is given by
x
cos θ − sin θ
u
=
.
v
y
sin θ
cos θ
To see this, just check that the unit vectors h1, 0i, h0, 1i go to the right places:
− sin θ
0
cos θ − sin θ
cos θ
1
cos θ − sin θ
=
=
cos θ
1
sin θ
cos θ
sin θ
0
sin θ
cos θ
<cos θ , sin θ >
<-sin θ , cos θ >
θ
θ
You can see from the picture that h1, 0i and h0, 1i have both been rotated by an angle θ. Other vectors
can be built out of these two vectors, so other vectors are rotated by θ as well.
4. Reflections. This is how to do a reflection across the x-axis:
x
1 0
u
u
=
=
.
y
0 −1
v
−v
It is clear that this reflects things across the x-axis, because it simply negates the second component.
3
What about reflection across a line L making an angle θ with the origin? It’s messy to do using analytic
geometry, but very easy using matrices. Simply do a rotation through −θ which carries L to the x − axis.
Next, reflect across the x-axis. Finally, do a rotation through −θ which carries the x-axis back to L. Each
of these transformations can be accomplished by matrix multiplication; just multiply the three matrices to
do reflection across L.
Translations, rotations, and reflections are examples of rigid motions. They preserve distances between
points, as well as areas.
Example. Find a real 2 × 2 matrix A such that
f
x
x
=A
y
y
√
reflects points across the line y = 3 x.
√
π
with the positive x-axis. I can accomplish this transformation
The line y = 3 x makes an angle of
3
as follows:
y
y
y
-p/3
p/3
x
x
Rotate the line
down to the x-axis
x
Rotate the x-axis
up to the line
Reflect across
the x-axis
Thus,
π
cos
3
A=
π
sin
3

c 2008 by Bruce Ikenaga

π 
cos π
− sin
3 1 0 
3
π
π
0
−1
− sin
cos
3
3

π
1
sin
−
3 =
2
√
π
3
cos
3
2
4
√ 
3
2 
.
1
2