Archived

This topic is now archived and is closed to further replies.

Toast

calculating the "normal"

Recommended Posts

you have a 3 sided face, a triangle in 3d space. how would you find the coordinates of a point that is directly "above" the midpoint of the face? and more specifically how would you find it when the three points are moved around? hmm, thats probably not all that clear the point would always be on the perpindicular bisector of the polygon.. ummm, say you have a triangle in your hand, and you glued a pencil in the middle pointing straight up, you have the coordinates of the corners of the triangle and the base of the pencil, now how do you find the coordinates of the tip of the pencil when the triangle is spun on any given angle? yeah, i dont see how else i could explain it i hope some of you know what im talking about....

Share this post


Link to post
Share on other sites
Alright, first you need to get two vectors from the triangle. The start of each vector will be a point in the triangle; the ends will be the other two points. Basically the vectors are two sides of the triangle, with the angle formed between them opposite to the third side.

Now, take the cross product of these two vectors, normalize them, and there''s your normal. To find the tip of the "pencil", scale the normal by the pencil''s length.

Share this post


Link to post
Share on other sites