Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: tangent space

  1. #1
    Junior Member Regular Contributor
    Join Date
    Apr 2010

    tangent space

    I have a matrix that rotates a set of points on a plane around a direction that is the normal of the plane.
    my problem is to find how these point are rotated around the normal and find an angle of rotation of these points about the normal direction.
    These points are a profile.
    I tried to do this with creating of a matrix that transform my basic points in a tangent space, like the bump mapping .
    Then i calculated the tangent,the normal and the binormal and i have create a matrix like:


    N is calculated with the cross product of two edge of the profile(i use tree point of the profile that are not in line)
    T is N rotated of 90 °(degree) swap the z with y and negate y.
    B is the cross product of T and N.

    This matrix transforms in a tangent space.
    But In tangent space how i can calculate the angle about the normal direction of the plane?
    result of the matrix rotation?

    mine is a sound approach?
    because i can't find the correct angle!


  2. #2
    Senior Member OpenGL Pro
    Join Date
    Apr 2010

    Re: tangent space

    Well, if you know the initial and the final direction, why not normalize both vectors, take the dot product and compute the acos of the former?

    Edit: Just to be clear, to really determine the angle in [0, 360] you also need to employ the sinus. This can be done using the relationship of the sinus and the cross product!

Posting Permissions

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