Skip to main content
gamedev.net
🔒 Locked

Matrix question

Started by evil_ash Jan 8, 2003 at 3:17 PM 0 replies 200+ views
Original Post
evil_ash
evil_ash
if the matrix [1,0,0,0 0,cos(radian),-sin(radian),0 ,0,Sin(radian),cos(radian),0 ,0,0,0,1] rotates around the x in reltaion to the point 0,0,0 would [1,0,0,x 0,cos(radian),-sin(radian),y ,0,Sin(radian),cos(radian),z ,0,0,0,1] rotate around the axis relative to point x,y,z
Paradigm Shifter
Paradigm Shifter
No. Let s = sin theta, c = cos theta.

Rotation around z axis
[ c s 0 0 ]
[ -s c 0 0 ]
[ 0 0 1 0 ]
[ 0 0 0 1 ]

around y
[ c 0 s 0 ]
[ 0 1 0 0 ]
[ -s 0 c 0 ]
[ 0 0 0 1 ]

so you swap the columns with sin and cos in them, and replace the other rows with rows from the identity.

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley
"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.