Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2007-06-12 13:50:31

rexin
Guest

Calculating rotation from the cube's 8 vertices.

Hallo,

I am having cube's vertices and I need to find out the rotation about x, y,z.
I found out the size of x, y,z.

I tried it a lot , but rotation angle is not correct.


this is my cube's vertices or coordinates

            6.017 0.954 -2.882,
            6.017 -5.907 -2.882,
            6.961 -5.907 -2.882,
            6.961 0.954 -2.882,
            6.017 0.954 3.884,
            6.017 -5.907 3.884,
            6.961 -5.907 3.884,
            6.961 0.954 3.884,

I'm not able to solve it.

help me in this regard.

thanks
rexin.

#2 2007-06-12 18:31:24

luca-deltodesco
Member
Registered: 2006-05-05
Posts: 1,470

Re: Calculating rotation from the cube's 8 vertices.

well it depends on the order of rotation really. which order are they rotated about the axi by?


The Beginning Of All Things To End.
The End Of All Things To Come.

Offline

#3 2007-06-12 19:55:20

rexin
Member
Registered: 2007-06-12
Posts: 2

Re: Calculating rotation from the cube's 8 vertices.

hi thanks for ur reply.
here I elaborate my question.

I draw cuboids , arrange together to form a single cuboid.

I exported this to vrml format, which has the coordinates of each cubes seperately with 8 vertices.
now I need to find the rotaion angle for each cuboid.

for each cuboid, rotation about x, in yz and rotation abot y in xz and rotation about z in xy..

I upload the vrml(.wrl) file , for ur kind reference.

http://www4.webng.com/koilraj/microwave.wrl

anxiously looking forward to your reply.

thanks

Last edited by rexin (2007-06-12 19:57:49)

Offline

#4 2007-06-13 04:22:28

luca-deltodesco
Member
Registered: 2006-05-05
Posts: 1,470

Re: Calculating rotation from the cube's 8 vertices.

is it necessary to have rotations seperated into axial rotations, as opposed to a single rotation matrix?

i.e. rather than needing to know the x,y,z rotational angles, can you not just have a single orientation matrix that will do the 3 consecuative transformations in one go? because that is MUCH easier to calculate.

i.e. rather having a set of x,y,z angles that create the matrices X, Y, Z, such that to rotate a local point to world space, you would do

ZYXp where p is the coordinate, you can just have a single matrix A, so that rather than ZYXp , you just do Ap


The Beginning Of All Things To End.
The End Of All Things To Come.

Offline

#5 2007-06-13 06:28:12

rexin
Member
Registered: 2007-06-12
Posts: 2

Re: Calculating rotation from the cube's 8 vertices.

hi luca-deltodesco,
thanks for ur reply.

actually i need those values to write into another file format.

and about findin the values. can u give a simple example or a lead.

that will be greatful

thanks

Offline

#6 2007-06-13 08:29:37

luca-deltodesco
Member
Registered: 2006-05-05
Posts: 1,470

Re: Calculating rotation from the cube's 8 vertices.

i tried a method i thought up, but it didnt work sorry

Last edited by luca-deltodesco (2007-06-13 08:47:10)


The Beginning Of All Things To End.
The End Of All Things To Come.

Offline

#7 2007-06-13 08:54:41

rexin
Member
Registered: 2007-06-12
Posts: 2

Re: Calculating rotation from the cube's 8 vertices.

pls give some directions to work up!
that will be a great help!

thanks

Offline

#8 2007-06-13 09:34:18

luca-deltodesco
Member
Registered: 2006-05-05
Posts: 1,470

Re: Calculating rotation from the cube's 8 vertices.

one thing i can say straight away, is that you will need not only the rotated vertices, but the original non-rotated vertices aswell, otherwise, there is not a unique set of values for xyz, and the values calculated cannot be guaranteed to be what would be expected, i can tell you that much


The Beginning Of All Things To End.
The End Of All Things To Come.

Offline

Board footer

Powered by FluxBB