Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 6 of 6

Thread: A very beginner's question

Hybrid View

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2013
    Posts
    23

    A very beginner's question

    We use dot product for finding the angle between two vector b1 and b2. Cross product also gives sin angle for the vectors as well as the axis of rotation. Why don't the cross product is used to determine the angle between vectors?

  2. #2
    Junior Member Regular Contributor
    Join Date
    Nov 2012
    Location
    Bremen, Germany
    Posts
    149
    9. You must be confusing something: The cross product is a vector, not a number. The resulting vector is perpendicular to the both operands.

  3. #3
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948
    Why don't the cross product is used to determine the angle between vectors?
    Because the cross-product is more expensive to compute. There are more reasons to compute the angle between two vectors than to just rotate around an axis.

  4. #4
    Junior Member Newbie
    Join Date
    Jan 2013
    Posts
    23
    Actually I wanted know that cross and dot gives cos and sin angle. If I need to know the angle, Is it ok to use the cross for computation of angle rather than dot product?

  5. #5
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    1,105
    What ever turns you on - Alfonse was just saying that if you don't otherwise need to compute the cross product that the cross product will take longer to execute than a dot product.

  6. #6
    Junior Member Newbie
    Join Date
    Jan 2013
    Posts
    23
    thanks for clarification.

Posting Permissions

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