Create a plane from list of triangles

Started by
2 comments, last by Gnollrunner 1 year, 1 month ago

Say i have set of triangles, each defines with 3 vertices in 3D; X, Y, Z and I want to create a plane based on them, what is the best way to approach that?
I know I can create a plane from a single triangle by computing its normal N = (B-A)x (C-A) and I can use a vertex like A as a root and I can build my plane, but how to do this if say I have 3 (or more) triangles?

Advertisement

Pick a point from each triangle. Calculate the normal of each triangle. Average the points. Average the normals. Optionally weight the averages by the area of each triangle.

@cebugdev2 Only one triangle defines a plane. You can have three triangles that happen to lie on the same plane, but generally that's not going to be the case unless you specifically created them like that. So assuming I understand your question, it doesn't really make a lot of sense.

This topic is closed to new replies.

Advertisement