can anyone assist me in finding the proper formula for quad normalization ?
using c++ with opengl.
thank you!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
Assuming that you want the normal vector for a quad, this pseudo-code works
This gives you the formula
n=A/|A|, whereA = v0xv1 + v1xv2 + v2xv3 + v3xv0andvi=vertex[i]).|A|/2is also the area of the polygon. This can be generalized to arbitrary polygons, and will even give reasonable results for non-planar polygons, as long as they aren’t too non-planar.One reference is http://softsurfer.com/Archive/algorithm_0101/algorithm_0101.htm
If you know that the quad/polygon is planar, you only have to calculate the normal of the triangle formed by the first three vertices. This is
A1/|A1|, whereA1 = (v1-v0)x(v2-v0) = v0xv1 + v1xv2 + v2xv0.If by “quad normalization” you meant something else, just ignore this answer.
EDIT: I found this related question: Get the Surface Area of a Polyhedron (3D object)