The limited stroke specification in OpenGL

Index

A large majority of the primitives drawn on our screens are not curves, even not squares, but they are triangles. For example, the widely used Open Graphics Language1 (OpenGL), a programming interface that allows the rendering of 2D and 3D vector graphics, has a very limited set of ways to draw lines and curves.

A Universe of Triangles2

OpenGL has an infinite amount of possibilities for drawing surfaces. But to simply plot a line, to be precise about the way it ends, or how it connects to another line, or how the stroke behaves... your options are surprisingly limited.

This is even more fascinating if you compare it to the richness of drawing with triangles. Triangles are used in a wide set of scenarios, as they are the most logical solution to approximate most 3D surfaces to a computed environment.


  1. OpenGL is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. https://en.wikipedia.org/wiki/OpenGL 

  2. Computerphile: "Videos all about computers and computer stuff. Sister channel of Numberphile." https://www.youtube.com/channel/UC9-y-6csu5WGm29I7JiwpnA