Question

I can't seem to find what the equation is for calculating the normal of a 4 vertex plane in 3D. Given 4 vertices, (x1, y1, z1), (x2, y2, z2), etc. How do I calculate the normal of the surface they create? I understand how it would work with a triangle shaped function, but I don't know for sure how to adapt it to 4 vertices

Was it helpful?

Solution

You will need to split the quad into two triangles (does not matter which way), calculate two normals and average them. Ideally, both normals are the same anyway, and in the other case you have a best possible approximation.

The reason is that a triangle is necessarily planar (there is no other way it could be), but for a quad you have no such guarantee. Therefore, you cannot possibly know that a single normal exists at all.

Averaging the normals of two sub-triangles is not ideal, but what else can you do on a primitive that has a "fold" in the middle.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top