Advertisement

3d rotation + matrix math

Started by September 24, 2002 12:00 PM
0 comments, last by nitzan 22 years, 5 months ago
Its been a while since I have done matrix multiplication. In order to rotate a point in 3d space I have to use the rotation matrixes, but they are 4x4 and my point is specified by 3 coordinates (x,y,z). Do I simply add another coordinate w, multiply against the 4x4 matrix and then set w to 0 ?


[x]   [1   0    0   0]
[y] * [0 cos -sin   0]
[z]   [0 sin  cos   0]
[w]   [0   0    0   1]

 
Nitzan ------------------------- www.geocities.com/nitzanw www.scorchedearth3d.net -------------------------
no, use w=1 to multiply your vector to the matrix. That way translations work correctly. (thats why its a 4x4 matrix)

This topic is closed to new replies.

Advertisement