Pages: 1 [2]   Go Down
Author Topic: Serial Graphic LCD  (Read 8199 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 49
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The camera is looking in the Z direction so that's why it seems to be rotating on its own axis, it's still in line with the camera Z axis. The order everything gets multiplied is very specific so apply all rotations first, then the translation. Usually the order will seem backwards to what you actually want to do.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes I agree if I translate the object before I rotate it, it ends up rotating about the center 0,0,0 like the moon around the earth instead of rotating along the axes...probably useful for something...but i just want to be able to rotate the object about its own axes.

I think I am going to have to just keep track of the orientation of the cube, and just add in angular increments to rotate the object from its current position...then store it again and so on...because if I try to calculate the rotation from 3 "finished" angles, then the order in which the rotations occur affects the outcome...so if I calculate x,y, then z and say they all rotated by 90 I would end up in a completely different orientation then if I calculated them z,y,x...accept for a few special cases of course.

I just can't think of a good way to determine the axes of rotation once the cube has been rotated already...I mean I can keep track of the new vertices of the rotated cube, but then I have to figure out how to rotate about the new angles that the axes are currently aligned with....
« Last Edit: December 15, 2010, 04:27:58 am by logical1 » Logged

Pages: 1 [2]   Go Up
Jump to: