8

I am starting openGL. Not able to understand why everything in graphics starts from triangles. Every article that I read says entire graphics rests on triangles.

What is the reason for choosing such a shape as a basic building block? I though square or circle would be much better and is logical because of the symmetry properties.

genpfault
  • 51,148
  • 11
  • 85
  • 139
user25108
  • 383
  • 5
  • 15
  • 2
    circles are the most illogical and hardest shape to render, not to mention the its impossible to render other stuff using circles. squares actually used as building block in different places and algorithms, but still they don't cover many shapes. anything can be represented using triangulation very easily so its logical to use triangles. – MoonBun Apr 06 '15 at 08:00
  • http://en.wikipedia.org/wiki/Polygon_triangulation – MoonBun Apr 06 '15 at 08:07
  • You should try to come up with a rendering algorithm for circles in 2D to see how hard it is. – user541686 Apr 06 '15 at 08:09
  • 2
    Computerphile explained it really nicely: https://www.youtube.com/watch?v=KdyvizaygyY – datenwolf Apr 06 '15 at 09:37
  • 1
    similar: http://stackoverflow.com/questions/6100528/why-are-there-always-triangles-used-in-a-3d-engine – jaroslawj Apr 06 '15 at 13:39

1 Answers1

11

Great question. It's because triangles are the only polygons that can approximate other shapes while also being guaranteed to lie in a plane, which means they have well-defined and easy-to-compute surfaces.

user541686
  • 205,094
  • 128
  • 528
  • 886