Jump to content
Sign in to follow this  
wateryfield

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

Share this post


Link to post
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.

angle_between_vectors.hipnc

  • Like 2

Share this post


Link to post
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 .

:)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×