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. Responses are currently closed, but you can trackback from your own site.

There are currently 10 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 May 8th, 2020, search scrapers said:

    search scrapers

    blog topic

  2. 2 On May 12th, 2020, search engine scrape said:

    search engine scrape

    blog topic

  3. 3 On May 13th, 2020, Google Search trends said:

    Google Search trends

    blog topic

  4. 4 On October 9th, 2020, click here said:

    click here

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

  5. 5 On January 24th, 2021, Dosing pump Indonesia said:

    Dosing pump Indonesia

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

  6. 6 On May 13th, 2021, bahasa inggris tempat belajar said:

    bahasa inggris tempat belajar

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

  7. 7 On January 13th, 2022, cara cepat menurunkan berat badan saat menyusui said:

    cara cepat menurunkan berat badan saat menyusui

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

  8. 8 On March 3rd, 2022, Cow Cubical Roll said:

    Cow Cubical Roll

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

  9. 9 On March 17th, 2022, RON Booster said:

    RON Booster

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

  10. 10 On July 24th, 2022, kontak speedware said:

    kontak speedware

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