Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4077468
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T17:33:15+00:00 2026-05-20T17:33:15+00:00

I have some face normals and I need to calculate the angle between the

  • 0

I have some face normals and I need to calculate the angle between the faces they belong to. The problem I’m having is with finding angles between faces when the angle is greater than 180 – I can’t figure out how to tell the difference between an angle of 45 and an angle of 315.

edit2:
I have access to the obj file defining the model, what information would i need to differentiate between 45′ and 315′? Also, I am building the (low-poly) models used, so I can guarantee no intersecting faces, etc.

edit:

ang = math.acos(dotproduct(v1, v2) / (length(v1) * length(v2)))

ang = math.degrees(ang)

ang = 360 - (ang + 180)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T17:33:15+00:00Added an answer on May 20, 2026 at 5:33 pm

    Ensure that your normals are unit length (divide by their length if necessary). Then find the dot product.

    dp = n1.x*n2.x + n1.y*n2.y + n1.z*n2.z

    This will give a value in [-1 to 1].
    If dp is negative, the angle is greater than 90 degrees.

    To find the angle, use arc-cosine.

    θ = acos(dp);

    That will give you the value in radians. To convert to degrees, multiply by 180/pi.


    Edit: Assume the faces are defined as polygons. If the faces are not co-planar, there must exist one point in each face’s polygon definition that is not co-planar with the other polygon. Consider two triangles: if one edge is connected, they share two vertices but each have one un-shared vertex. I’ll call these v1 and v2 associated respectively with normals n1 and n2. Find the vector from v1 to v2:

    m = v2-v1
    

    If the angle between m and n1 is greater than 90 [dotP(m,n1)<0] then the polygons face away from each other. If the angle is less than 90, the polygons are facing toward each other. If the angle is 90 degrees, then I think that the polygons are co-planar (or one of your chosen points is on the line of planar intersection or I’ve missed a case in my thinking).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some problem with font-face that are loaded are deform my div height.
I face some layout differences in IE and in Chrome. I have searched Stack
I have some images with height=auto because sometimes they are different heights whereas they
I have some buttons my page using a custom font face using the CSS
I have some allocated cv::Mat face; with actual data in it and I want
I have some problem with replace string in Ruby. My Original string : What
I have some @font-face webfonts on my site. The fonts and the CSS code
I'd like to have some help on an issue I face. I'm using serialization
I have some perl code that looks something like this: my @array = map
I have some input elements that the users are request special behavior on pageup

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.