Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Kaesebrot

ratation around an Vector

This topic is 6115 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi.. I have an Identity Matrix. Now I create one Matrix for X-Rotation, one for the Y-Rotation and one for the Z-Rotation. The next thing I do, is to multiply my Identity Matrix with each Rotation-Matrix.. with this method I rotate my Matrix step by step around each achsis.. And here is my problem: I want to rotate around the X-Achsis.. after this I want to rotate around the Y-Achsis, which is changed by the X-Rotation. At Least I want to Rotate around the Z-Achsis, which is also changed by the previous transformations.. I hope somebody understand my problem and is able to help me..

Share this post


Link to post
Share on other sites
Advertisement
If i got it , you want the rotation matrix around all the three axeses , don''t you ? , well , just multiply the x,y,z rotational matricies one after each other and remember that the order of multypling affects the resulting matrix, that''s to say
you have a resulting matrix that look like taht
R= Mx * My * Mz


Share this post


Link to post
Share on other sites
Hmmm.. the same thing I did before...

okay.. let's say you have three sticks which are aligned like my three axeses. I clue them together, and put them on my desk. The stick which symbolizes my y-axes points in the sky and the stick which symbolizes my z-axes points in my direction.
Now I take the z-strick an spin it about 90 degrees.
The next thing I want to do is to spin my y-axes.. but what is that. The y-stick changed his position. If I now rotate around the y-stick it's like an z-rotation.. and that's what I want to do..
it's don't cares in what order I perform the transformations the result is the same.

if I transform my Matrix this way:
M = X * Y * Z
the result is different..

please help me again..


Edited by - Kaesebrot on December 26, 2001 7:41:20 AM

Share this post


Link to post
Share on other sites
I think you''re saying , i have a vector and i want a rotation matrix so i can point on that direction, am i right ?
if so this is a well known problem , solved by quaternions
or through the use of euler angles, but eluler angles , given
some vector direction may cause the well-known gimbal lock, so i usually preferr to stick with quaternions, because the functions
are really long , i suggest you to search in this site for quaternions or email me and request the code from my math library

Share this post


Link to post
Share on other sites
käsebrot (yeah, i know what this means..)
you have a very nice description of the gimbal-lock. in fact the perfect example why we can''t representate rotations the way you wanted to do. try to read into quaternions, they are really usefull to store orientations and to rotate orientations around (what you wanna do..)

we wanna play, not watch the pictures

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!