[PD] [Gem] angles -> vector translation

Roman Haefeli reduzierer at yahoo.de
Fri Feb 23 20:12:36 CET 2007

hello everyone 

i am working on a gem-patch. i want to make the user feel like flying
freely through the 3d-space (what an ugly old-schooled sentence, i
know ;-). 
the problem i have is, that when i rotate the world, i would like the
user to fly in the same direction, so that when moving the vanishing
point stays in the middle of the gemwin to create the feeling of always
looking forward. 
in other words, i need to 'translate' the rotation done with [rotateXYZ]
by the three axes X, Y and Z to a vector {x,y,z}, so that the user flies
in the same direction as he is looking to. 

i was told that what i want to achieve is done with a matrix, but
unfortunately my mathematical knowledge is far from being able to set it
up myself. 

the user is looking to:        vector to translate ('move'):

angle X = 0°                   Vx = 0
angle Y = 0°                   Vy = 0
angle Z = 0°                   Vz = 1

angle X = 0°                   Vx = -1
angle Y = 90°                  Vy = 0
angle Z = 0°                   Vz = 0

angle X = 90°                  Vx = 0
angle Y = 0°                   Vy = 1
angle Z = 0°                   Vz = 0

how can i compute the correct vector for any set of angles? 

sorry for any inconvenience because of terms that might be used in the
wrong way. i am not a mathematician and i hope, it is still clear, what
i want to achieve.

many thanks in advance for any help.


Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de

More information about the Pd-list mailing list