Sunday, June 26, 2011

Rotational transformation: geometrical view

A bit more about rotational transformations (see the previous post for the setup to this). We derived equations describing the coordinates of a point at x,y with respect to a new coordinate system in u,v that is rotated counter-clockwise by an angle θ:

x = u cos(θ) - v sin(θ)
y = u sin(θ) + v cos(θ)

We can also solve these equations for u and v. (It helps to know the answer). Notice that if we multiply the first equation by cos(θ) and the second one by sin(θ) and add, we'll end up with u by itself on the right-hand side:

x cos(θ) = u cos2(θ) - v sin(θ) cos(θ)
y sin(θ) = u sin2(θ) + v cos(θ) sin(θ)

x cos(θ) + y sin(θ) = u cos2(θ) + u sin2(θ)
x cos(θ) + y sin(θ) = u

Similarly, if we multiply the first equation by sin(θ) and the second one by cos(θ) and subtract the first from the second, we end up with v by itself:

x sin(θ) = u sin(θ) cos(θ) - v sin2(θ)
y cos(θ) = u sin(θ) cos(θ) + v cos2(θ)

- x sin(θ) + y cos(&theta) = v cos2(θ) + v sin2(θ)
- x sin(θ) + y cos(&theta) = v

I came up with geometric explanations for these relationships, the one for x and y in terms of u and v is at the top of the post, and below is the same drawing but explaining u and v in terms of x and y.

A quicker way to the same place is to start by considering u and v to be the original coordinate system, and rotate clockwise through the angle θ. Then θ is negative, sin(θ) = -sin(-θ) and the cosine stays the same. We end up switching the signs of the sine terms, as we found.