The "real" angle between two triangular surfaces

Click For Summary
SUMMARY

The discussion focuses on calculating the angle between two triangular surfaces in 3D space, particularly when dealing with triangular meshes in applications such as modeling humans and animals. The primary method discussed involves extracting the normal vectors of each surface and using the dot product to compute the cosine of the angle. However, the challenge arises when determining the actual angle when the cosine value corresponds to multiple angles, particularly in cases where angles exceed 180 degrees. Participants suggest using vector algebra techniques, including cross products and scalar products, to differentiate between concave and convex angles effectively.

PREREQUISITES
  • Understanding of vector algebra, including dot and cross products.
  • Familiarity with 3D triangular meshes and their properties.
  • Knowledge of normal vector calculations for surfaces.
  • Basic experience with MATLAB for implementing predefined functions.
NEXT STEPS
  • Learn how to compute normal vectors for triangular surfaces in 3D using cross products.
  • Study the implications of concave and convex angles in 3D geometry.
  • Explore the use of scalar products to determine the orientation of angles between surfaces.
  • Investigate advanced techniques for angle calculations in complex 3D models using MATLAB.
USEFUL FOR

This discussion is beneficial for 3D modelers, computer graphics developers, and anyone involved in geometric computations, particularly in the context of triangular meshes and surface angle calculations.

mbouksim
Messages
3
Reaction score
0
Hello everyone,
i'm new to the forum so hope it is the right place for my question :)
i need to know the angle between two triangular surfaces, the easiest way would be extract the normal for each surface(u,v) and then using the dot product we can easily compute the cosine for the angle I'm looking for.
843391angle.png

the problem with this method is that my angle (let's call it [the]) ranged between [0°,360°] and the cosine is symmetric, what i mean is how to know the real angle when the cos[the]=1/2 (the=60° or 300°).
thanks in advance for your help and sorry for my bad English
 
Last edited by a moderator:
Physics news on Phys.org
Not clear on your method, but the internal angle of a convex polyhedron (without any cavities) will always be less than 180 degrees, so for the example that you gave, the 300 degrees would be invalid. for a convex polyhedron if the angle you are calculating is one of the ones that form the cavity and has an internal angle of more than 180 degrees then that gives you the 300 degrees choice for your example.
 
a1call said:
Not clear on your method, but the internal angle of a convex polyhedron (without any cavities) will always be less than 180 degrees, so for the example that you gave, the 300 degrees would be invalid. for a convex polyhedron if the angle you are calculating is one of the ones that form the cavity and has an internal angle of more than 180 degrees then that gives you the 300 degrees choice for your example.
thanks for your answer :) and sorry i didn't explain well my problem the polyhedron is just an example but in real I'm working a 3D triangulare meshes (for humans, animals, furniture ...) where the angle between two adjacent triangle could easily be more than 180 degrees
bunny_badsimp_1.jpg
 
If you can measure the angles between the 2 normal lines, why not use that to calculate the angles as:
angle= 180 degrees - (the-angle-between-the-two-normal-line)
internal angles of any 4 edged polygon add up to 360 degrees.

ETA Just realized the same problem can exist in a concave edge since the normal angle would form outside the polyhedron.
it seems to me if you can not know if the edge between the two faces is concave or convex then there is no way to distinguish between the 2 cosine values. however there has to be a way to know the concave/convex status of the edge between the two faces.
 
Last edited:
mbouksim said:
I'm working a 3D triangulare meshes (for humans, animals, furniture ...) where the angle between two adjacent triangle could easily be more than 180 degrees

Perhaps I don't understand what angle you want to compute, but I don't see any instances in the rabbit model where two adjacent triangular surfaces have an angle of more than 180 deg between them. Can you show a figure where two adjacent triangular faces have an angle of more than 180 degrees between their normals ? Would this occur when we try to assign the directions of normals to a triangulated mobius strip ?
 
  • Like
Likes   Reactions: mfb
Are you familiar with vector algebra?

You could create position vectors for each vertex and then for any given face triangle subtract the three vertex vectors to get two vectors in the same plane as the face triangle. From there a cross product will give you the normal vectors (then normalize it to get the unit normal vector) you seek.

I think your figure in the first case is a regular polyhedron so that a sphere can be drawn around it with all vertices touching the surface of the sphere meaning they are all equidistant from the center of the sphere so you could choose the center as the point of origin for all the vertex position vectors mentioned earlier.
 
In the rabbit figure any edges in the concave areas such as under the chin or inward caved back would form an internal angle of more than 180 degrees between the joining faces.
 
I think if you compute both the dot product of the normals and also the cross product of the normals then you can deduce the angle between the surfaces.
 
  • Like
Likes   Reactions: member 587159 and jedishrfu
a1call said:
In the rabbit figure any edges in the concave areas such as under the chin or inward caved back would form an internal angle of more than 180 degrees between the joining faces.
So you want the angle also depend on the question what is "outside" and "inside"? This is not possible with the angles alone, you also have to take the relative location of the faces into account.
Assuming all normal vectors face outwards (or all inwards): take the difference between a point on one triangle and a point on the other triangle. Take the scalar product with the difference of the normal vectors. The sign should tell you which case you have.
 
  • #10
Thanks for all this answer :) and I'm sorry for the delay i was having problem with my internet connection :/
Stephen Tashi said:
Perhaps I don't understand what angle you want to compute, but I don't see any instances in the rabbit model where two adjacent triangular surfaces have an angle of more than 180 deg between them. Can you show a figure where two adjacent triangular faces have an angle of more than 180 degrees between their normals ? Would this occur when we try to assign the directions of normals to a triangulated mobius strip ?
here is an exemple of what i need to compute
522564Image2.png

for example i need to compute the outsider angle between the two surface F1, and F2 the angle is obviously 270°, but computing the normal to each triangle and then deducing the angle it returns 90°

jedishrfu said:
Are you familiar with vector algebra?

You could create position vectors for each vertex and then for any given face triangle subtract the three vertex vectors to get two vectors in the same plane as the face triangle. From there a cross product will give you the normal vectors (then normalize it to get the unit normal vector) you seek.

I think your figure in the first case is a regular polyhedron so that a sphere can be drawn around it with all vertices touching the surface of the sphere meaning they are all equidistant from the center of the sphere so you could choose the center as the point of origin for all the vertex position vectors mentioned earlier.

i'm not so familiar with vector algebra, but i'll try to implement the method you proposed thank you :)

a1call said:
In the rabbit figure any edges in the concave areas such as under the chin or inward caved back would form an internal angle of more than 180 degrees between the joining faces.
sorry i didn't give a good explanation of my problem I'm looking for the outside angle like the picture above you can see that the angle between the two triangle F1 and F2 is equal to 270°

Stephen Tashi said:
I think if you compute both the dot product of the normals and also the cross product of the normals then you can deduce the angle between the surfaces.
I hope I'm not asking too much but can you give me more details on how to combine dot product and the cross product to deduce the angle

mfb said:
So you want the angle also depend on the question what is "outside" and "inside"? This is not possible with the angles alone, you also have to take the relative location of the faces into account.
Assuming all normal vectors face outwards (or all inwards): take the difference between a point on one triangle and a point on the other triangle. Take the scalar product with the difference of the normal vectors. The sign should tell you which case you have.
as showing in the above image I'm looking for the outside angle, i used a predefined function in MATLAB to make sure that all my normal vectors are outwards.
if it is not to much to ask could you explain to me how to combaine the difference between points, scalar product ?

Thanks again for all your answers and again i apologize for my bad english
 
  • #11
mbouksim said:
as showing in the above image I'm looking for the outside angle, i used a predefined function in MATLAB to make sure that all my normal vectors are outwards.
if it is not to much to ask could you explain to me how to combaine the difference between points, scalar product ?
Does a specific example help?

Let's say you have point A(4,5,3) at F1 with normal vector v=(1,0,0), and point B(3,8,8) at F2 with normal vector w=(0,1,0).
Then (B-A) = (-1,3,3), and v-w=(1,-1,0).
Scalar product: (B-A)*(v-w)=1*(-1) + (-1)*3 + 0*3 = -4.
It is negative, this should correspond to an angle larger than 180°,
 

Similar threads

  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 16 ·
Replies
16
Views
3K
Replies
21
Views
3K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 49 ·
2
Replies
49
Views
5K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 12 ·
Replies
12
Views
3K
Replies
3
Views
4K