#### Archived

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

# Representing an objects orientation in 3d... help please?

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

## Recommended Posts

Okay, I''ve been madly designing a really nice 3d engine for the past few weeks, and it just hit me... How do i represent an object''s orientation in 3d? i had originally planned on just using 3 angles to represent it, when I realised... wow, thats complex. Not only are angles susceptible to ''Gimbal Lock'', but they need to be defined in a specific order too. So, i''ve been researching into different ways to represent an objects orientation, and I came up with the idea that two vectors should be enough to represent an object. One vector to represent where the object is pointing, and the other to represent its ''roll'' along the axis of the first vector. Is this method reccomended? I''d like to know people''s opinions on this subject. Also, would it be better to represent an objects change in orientation relatively, or absolutely? I think relative would be better, that way, I can have an object rotate along its own axis, instead of the world axis. Are there any formulas for defining a vectors rotation around an arbitrary axis, as opposed to a rigid axis? =============================================== "Tell brave deeds of war." Then they recounted tales, -- "There were stern stands And bitter runs for glory." Ah, I think there were braver deeds.

##### Share on other sites
A lot of programmers use some sort of matrix. Don't know how it works, just that everybody uses them.

Edited by - CobraA1 on 4/30/00 3:08:30 PM

##### Share on other sites
Try looking at quaternions..

##### Share on other sites
Quaternions is exactly what you are looking for. Check this out: Matrix & Quaternion FAQ

/ LC

Edited by - Lord Chaos on 5/1/00 11:55:52 PM

• 15
• 13
• 35
• 39