[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
-------------------------
3d rotation + matrix math
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 ?
September 24, 2002 12:02 PM
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
Popular Topics
Advertisement
Recommended Tutorials
Advertisement