Orientation help

Post requests, images, descriptions and reports about work in progress here.
Topic author
foravalon
Posts: 50
Joined: 07.05.2005
With us: 19 years 6 months
Location: Santa Rosa, CA

Orientation help

Post #1by foravalon » 05.07.2009, 17:36

Can someone help me understand the orientation value for orbiting objects? I've been trying to make heads or tails of it and I haven't been having much luck.

Example: " Orientation [270 1 0 0] "

there are 4 arguments here, as near as I can figure I think the first argument is a degree value from 1-360, and then the next three values are x, y, and z, which correspond in some way to yaw, pitch, and roll, but not in that order, I believe that thier values run from Zero to One.

But if that's the case I don't understand which value the initial degree is dictating, I think the value dictates the degrees for all three, the x, y, and z but then I realize that I have no clue what I'm saying and trial and error experiments defy my hypothesis.

i haven't had much luck finding an explanation on the net either so I now turn toward my celestial brothers and sisters here. can anyone shed some light on this Orientation system and help me get my models at the correct angles?

Thank you!
Foravalon's most common phrase: "So, yeah, um, how do you do this... ?"

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Re: Orientation help

Post #2by selden » 05.07.2009, 17:51

The Orientation directive uses the "axis angle" representation of a rotation: the number of degrees to rotate, and the direction cosines of the axis to rotate around. One description of this convention is at http://www.euclideanspace.com/maths/geo ... /index.htm

It's used to change the orientation of a model relative to its own internal coordinate system. It's often used to correct for the difference between the coordinate system used within 3DS models and the coordinate system used by Celestia:

Code: Select all

Orientation [90 1 0 0]
rotates a model 90 degrees around its X axis.

In general, one would use BodyFrame and one of the Rotation directives to position models within Celestia, since that orients them relative to the other objects in Celestia instead of relative to their internal coordinates.
Selden

Topic author
foravalon
Posts: 50
Joined: 07.05.2005
With us: 19 years 6 months
Location: Santa Rosa, CA

Re: Orientation help

Post #3by foravalon » 07.07.2009, 02:58

Thanks so much for the clue-in Seld!
Foravalon's most common phrase: "So, yeah, um, how do you do this... ?"


Return to “Add-on development”