BenBE
18-10-2004, 06:51 PM
I'v the following problem:
I'v a viewing vector that represents the Z-Axis (given) of the image and want to calculate the X- and Y-Axis out of this vector which is the normal of the X and Y vectors (wanted).
For a non-rotated view vector, i.e. Z = (0,0,1), there's not much a problem, because X = (1,0,0) and Y = (0,1,0).
But the problem comes when I need the X and Y vector when I don't know how the Z vector was rotated, e.g. when Z = (1,2,3).
Is there another way to transform X and Y without needing to calculate the angles that Z was rotated by?
Could somebody give me information on this matter, please?
TIA,
BenBE.
I'v a viewing vector that represents the Z-Axis (given) of the image and want to calculate the X- and Y-Axis out of this vector which is the normal of the X and Y vectors (wanted).
For a non-rotated view vector, i.e. Z = (0,0,1), there's not much a problem, because X = (1,0,0) and Y = (0,1,0).
But the problem comes when I need the X and Y vector when I don't know how the Z vector was rotated, e.g. when Z = (1,2,3).
Is there another way to transform X and Y without needing to calculate the angles that Z was rotated by?
Could somebody give me information on this matter, please?
TIA,
BenBE.