[ cosØ sinØ 0 0 ] [-sinØ cosØ 0 0 ] [ 0 0 1 0 ] [ 0 0 0 1 ]The Evil Z-rotation matrix.
x' = x(cosØ) - y(sinØ)Because X turns into the horizontal component of the angle it is being rotated by, scaled to be proportional to x, scootched over (if there was any y displacement to begin with) a distance proportional to the vertical component of the rotation angle scaled to the original amount of y displacement.
Now if I accosted a stranger on the street and started babbling this stuff at them, it would surprise me greatly if they had anything constructive to contribute. If shared this stuff with my friends, I wouldn't be trying to educate them. At best I'd be showing off my math. ("My, what a long division you have.") So, I'm writing it here. All I've been thinking about is transformation matrices, vectors, cross product, normals, lighting, phong shading, affine transforms, and how to explain it all to my computer's processor. Fortunately it's been done before, by many gifted programmers and teachers. Today I figured out why the y coordinate on everything I rotated through the z axis was coming out weird. It was because I was using x prime from the first column of the matrix in the equation to get y prime. Instead of rotating in circles, my points would fly in pinched figure eights. That's all fixed now.
I wish I had stopped at Kris' house on the way up here. My guitar lives there now, amongst the racks and amps. I haven't been playing it much since Saturday, since I got more involved in looking at 3D graphics and such.
As I re-learn the math I forgot since high school, I've been getting these carbonated headaches that flicker through the left side of my head. I figure it's due to a condition like muscle atrophy, but applied to the parts of my brain that do math. Since I haven't been doing much applied trig or calc lately, it's a considerable effort to think about it. The more I do it, the less it hurts. The less it hurts, the less of Ed's Advil I use. Everyone's happy, and my points are rotating nicely, and not going in spirals or anything ridiculous like that.