View Single Post
Nov30-08, 04:28 PM
DaveC426913's Avatar
P: 15,319
Hm. Well, you lost me right about
Quote Quote by D H View Post
I'll start with 2D rotation and transformation matrices and extend this to 3D.

Physical rotation of a vector in 2D
Suppose you have a vector with cartesian coordinates (x,y) and want to rotate this by some angle theta. I'll use the conventional notations
  • the x-axis is horizontal, positive to the right,
  • the y-axis is vertical, positive upward,
  • vectors are expressed as column vectors, and
  • rotation is positive counterclockwise.
Expressed as a column vector, the vector from the origin to [itex](x,y)[/itex] is

[tex]\boldsymbol{r} = \bmatrix x\\y\endbmatrix[/tex]

The coordinates of the endpoint of the rotated vector are (derivation is an exercise left to the reader) [itex](x\cos\theta - y\sin\theta, x\sin\theta + y\cos\theta)[/itex] or

[tex]\boldsymbol{r}' =
\bmatrix x\cos\theta - y\sin\theta \\ x\sin\theta + y\cos\theta\endbmatrix
= \bmatrix \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \endbmatrix \, \bmatrix x\\y\endbmatrix
= \mathbf{R}(\theta) \, \boldsymbol{r}[/tex]


\equiv \bmatrix \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \endbmatrix

is the 2D matrix that physically rotates a column vector by an angle [itex]\theta[/itex].

If I define a point in the 3D space at xyz, and I supply a rotation of xyz, will those equations spit out an xy coordinate for it in the viewing plane?

I'm sorry, I have great facility with conceptualizing mathematics but, without a formal post-secondary education, I'm afraid the representation on paper is beyond me. I guess I'm in over my head.