23rd May 2006

signed angle between two vectors(3d) in c/c++

posted in reviews |

I tried to realize some point-in-polygon-test in 3D for my raytracer and came upon the problem to calculate a signed angle between 2 vectors. Trying to find this in the web was not easy, somehow most people project the polygon plane and the point into 2d and do the test there. But here is the method i found:

signed_angle = atan2(  N * ( V1 x V2 ), V1 * V2  );
// where * is dot product and x is cross product
// N is the normal to the polygon
// ALL vectors: N, V1, V2 must be normalized

It worked for me.

This entry was posted on Tuesday, May 23rd, 2006 at 11:58 pm and is filed under reviews. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

There are currently 22 responses to “signed angle between two vectors(3d) in c/c++”

Why not let us know what you think by adding your own comment! Your opinion is as valid as anyone elses, so come on... let us know what you think.

  1. 1 On January 20th, 2009, Polypterus said: [Quote]

    Thanks man! You just fixed my chase camera!!

  2. 2 On June 8th, 2009, paul said: [Quote]

    Very cool!!!!!
    thanx Man!!!!!!!

  3. 3 On November 25th, 2013, pligg.com said: [Quote]

    signed angle between two vectors(3d) in c/c++ …

    signed angle between two vectors(3d) in c/c++…

  4. 4 On December 7th, 2013, pligg.com said: [Quote]

    signed angle between two vectors(3d) in c/c++ …

    It is a single of the citrus loved ones like oranges and lemons. It boosts rate of metabolism of the system and as a result facilitates the burning of unwanted fat. Caffeine is a stimulant and can make you truly truly feel for energized. There are lots…

  5. 5 On December 30th, 2013, Call of Duty Ghosts Prestige Hack | Creazioni Magiche said: [Quote]

    […] you have any concerns pertaining to where and just how to make use of Cod Ghosts Prestige Hack, you could call us at the […]

  6. 6 On January 23rd, 2014, Erreur #2 : branchez redactor | Radio Agun said: [Quote]

    […] horoscope de demain […]

  7. 7 On April 27th, 2014, love quotes en español said: [Quote]

    love quotes en español…

    signed angle between two vectors(3d) in c/c++ » Pictures and Code…

  8. 8 On June 23rd, 2014, Dash diet said: [Quote]

    Dash diet…

    signed angle between two vectors(3d) in c/c++ » Pictures and Code…

  9. 9 On June 24th, 2014, Sex Shop 365 promo code said: [Quote]

    Sex Shop 365 promo code…

    signed angle between two vectors(3d) in c/c++ » Pictures and Code…

  10. 10 On June 25th, 2014, akira91915.com said: [Quote]

    akira91915.com…

    signed angle between two vectors(3d) in c/c++ » Pictures and Code…

  11. 11 On July 5th, 2014, raa insurance said: [Quote]

    raa insurance…

    signed angle between two vectors(3d) in c/c++ » Pictures and Code…

  12. 12 On August 22nd, 2014, irish wedding rings claddagh said: [Quote]

    irish wedding rings claddagh…

    signed angle between two vectors(3d) in c/c++ » Pictures and Code…

  13. 13 On September 10th, 2014, Yuri said: [Quote]

    Yuri…

    signed angle between two vectors(3d) in c/c++ » Pictures and Code…

  14. 14 On September 23rd, 2014, Weber said: [Quote]

    Weber…

    signed angle between two vectors(3d) in c/c++ » Pictures and Code…

  15. 15 On September 25th, 2014, tablets android said: [Quote]

    tablets android…

    signed angle between two vectors(3d) in c/c++ » Pictures and Code…

  16. 16 On October 7th, 2014, kids said: [Quote]

    kids…

    signed angle between two vectors(3d) in c/c++ » Pictures and Code…

  17. 17 On October 9th, 2014, simply click the following page said: [Quote]

    simply click the following page…

    signed angle between two vectors(3d) in c/c++ » Pictures and Code…

  18. 18 On October 11th, 2014, italian kitchen brands india said: [Quote]

    italian kitchen brands india…

    signed angle between two vectors(3d) in c/c++ » Pictures and Code…

  19. 19 On October 11th, 2014, scatter cushion Suppliers south africa said: [Quote]

    scatter cushion Suppliers south africa…

    signed angle between two vectors(3d) in c/c++ » Pictures and Code…

  20. 20 On October 11th, 2014, mozilla.org said: [Quote]

    mozilla.org…

    signed angle between two vectors(3d) in c/c++ » Pictures and Code…

  21. 21 On October 15th, 2014, similar site said: [Quote]

    similar site…

    signed angle between two vectors(3d) in c/c++ » Pictures and Code…

  22. 22 On November 17th, 2014, batwiki.svenskabatmarknaden.se said: [Quote]

    batwiki.svenskabatmarknaden.se…

    signed angle between two vectors(3d) in c/c++ » Pictures and Code…

Leave a Reply