• Advertisement

Archived

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

Quaterions?

This topic is 5968 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

ämm ... yes, i know what quaterions are, i have seen a lot of Calculation Codes for them, the forumular they work is x² + Y² + z² + w² = 1 a friend said that i can use them as a Vector, but what happens if X = 0 , Y = 0 , Z = 0 , and W = 1 ??? ... could somebody explain this ( and please dont give me always links ! ) And how could i usw them, if i want to rotate about an axis .. ? Can i use them to Vector Calculations ... an how ?

Share this post


Link to post
Share on other sites
Advertisement
> the forumular they work is x² + Y² + z² + w² = 1

This is the condition for a quaternion to be a unit quaternion. It''s usual to impose this condition on quaternions you want to use for rotations - you can do rotations with non-unit quaternions but it''s more work.

> a friend said that i can use them as a Vector,

Vectors and quaternions are different things, although they look similar. Quaternions and rotation matrices are related, as they do the same thing [rotate] and it''s possible to convert betwwen them.

> but what happens if X = 0 , Y = 0 , Z = 0 , and W = 1 ??? ...
> could somebody explain this ( and please dont give me always
> links ! )

This is an identity quaternion. Like an identity matrix it is equivalent to a rotation that does not change anything.

> And how could i usw them, if i want to rotate about an
> axis .. ?

Look for code to convert from angle-axis to quaternion. E.g. there''s lots of info on this in gamedev''s articles. Often there''s a library call that does this, e.g. there''s one in D3D.

> Can i use them to Vector Calculations ... an how ?

You can use quaternions to rotate vectors. Again look for sample code to do this or use library functions.

Share this post


Link to post
Share on other sites

  • Advertisement