Jump to content

Calculation the angle of the polygon


Recommended Posts

Guys.

Help me a trigonometric functions problems, i have to calculation the angle of the polygon.

The expression  angle = acos (dot(N(V1),N(V2)))  can't get the degrees great than 180, i have a polygon interior angle great than 180.

How can i judge when negative the angle, I totally forget the  dot product principle.    :D

Thanks.

angle_between_vectors.hip

Link to comment
Share on other sites

You need to check if two adjacent edges are convex or concave.

I used dot product between normal and cross product for that. I also modified how to compute angle between edges. I used neighbour edges instead of edge and normal becouse you got some strange results on some points.

Look at file.

Thanks!  Pezetko.

It really works great.

I have to review the dot product and Normal .

:)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...