[Hill:224-225. Foley & van Dam: p.208-210, 217-222]
Find the transformation that rotates by an angle theta about
a point P(x,y):
Let's choose to describe all transformations w.r.t. a fixed set of
axes:
translate P to origin: trans(-2,-3,0)
perform rotation: rot(z,90)
translate P back: trans(2,3,0)
T = trans(2,3,0) rot(z,90) trans(-2,-3,0)
Rotation about an arbitrary axis
Hill: 239-241
translate axis k to origin: trans(-P0)
rotate about x-axis to bring axis k' to lie in xz plane:
rot(x,alpha)
The amount of rotation is determined by looking at the projection
on the yz plane. Alpha need not actually be calculated; it's
sine and cosine can be evaluated directly.
rotate about y-axis to align axis k'' with z-axis:
rot(y,-beta).
As in the previous step, we need not actually calculate beta.