Results 1 to 2 of 2

Thread: Math: Calculation of view vector normals

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Math: Calculation of view vector normals

    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.
    The more complex a system is, the smaller the bugs get; the smaller the bugs are, the more often they appear.

  2. #2

    Math: Calculation of view vector normals

    You don't have enough information to calculate x and y given just z. If you think about it you can rotate x and y around the z axis and z won't change - so there are an infinite number of possibilities for x and y.
    You need another constraint to calculate x and y. If you can visualize the way you want the axis to move then you should be able to work out what the other constraint is - maybe you want the x-axis to stay parallel to the world x-z plane or something.

    Peter

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •