Welcome, Guest

Author Topic: Rotation representation in XML  (Read 2966 times)

lukas

  • *
  • Posts: 2
Rotation representation in XML
« on: May 27, 2011, 04:06:55 AM »
I have a question about rotation representation. In the program, there's three parameters representing the rotation (X,Y and Z), but when I save a simulation and export objects.xml, I see there's four parameters in the <rot> element, separated by semicolons. I am familiar with Euler angles, but I've heard there's several types of rotation representation, some with three and some with four parameters. Which representations do Universe Sandbox use?

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Re: Rotation representation in XML
« Reply #1 on: June 13, 2011, 12:53:49 PM »
The file format saves using the normalized rotation axis (x,y,z) and the angle of rotation along that axis:

So a value of: 1,0,0,90 - would be an object who's axis was perfectly aligned with the x axis and then rotated 90 degrees along that axis.

Does that help?


Uskfver

  • *
  • Posts: 1
Re: Rotation representation in XML
« Reply #2 on: August 11, 2011, 02:41:13 PM »
I have not used Universe Sandbox but I found this forum while searching Google for my current issue, which I believe is represented in the same format.

How is this rotation representation used for rotation on multiple axes? For example, if I want to rotate 90 degrees around the x axis and 45 degrees around the y axis, what would the four values be?