Why are triangles always used for drawing surfaces in 3D? Why not a square or some other shape?
Share
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.
Triangles can never be non-planar; anything with more than 3 points can be non-planar and thus un-renderable unless converted to triangles.
For example: A square is two triangles that are on the same plane, if all the points that make up the square are co-planar. It takes a lot of calculations to make sure all the points are co-planar, thus all polygons that are greater than 3 points are pre-calculated by decimating them into triangles and tested to make sure all the points are co-planar once, instead of on every frame that gets rendered.
Here is good reference about polygon meshes.
Planar Mesh
(source: softimage.com)
Non-Planar Mesh
(source: softimage.com)
and one more example that might make it clearer
(source: autodesk.com)
The non-planar mesh is degenerate and can’t be sorted or rendered correctly in any sane manner. Triangles don’t have this problem.
Efficiency
Triangles also are very memory efficient and can be sorted, and rendered extremely fast when using Triangle Strips which only need 1 point to be stored for each additional triangle after the first.
http://upload.wikimedia.org/wikipedia/en/0/03/Triangle_Strip.png
and Triangle Fans which is a special case of a Triangle Strip.
(source: codesampler.com)