Forget Triangles, Vertices Rule!

We all play games, but itâ€™s easy to forget how many mathematics and processing power is involved to actually bring you the ultimate realistic 3D game play experience. That fabulous well-endowed female you just shot while playing your first person shooter is actually nothing more than a collection of vertices, polygons, textures, blending and a bunch of other boring math operations. Most of you undoubtedly have heard that a triangle is the basic building block of 3D graphics, while this holds true for a large part of the graphics pipeline, itâ€™s not exactly true for the part of the pipeline that is being discussed in this article. The basic building block we need is a single, simple, boring (?), point in 3D space.

Defining the position of a point in 3D space is, traditionally, done using a Cartesian coordinate system. A coordinate system defines an origin, and three main axes : left/right or X, up/down or Y, forward/backward or Z. Along each axis a length relative to the origin can be used to uniquely define a point. For example two to the right, one up and one forward defines one unique point in 3D space. This concept is illustrated by the figure below: Point in 3D Space

Obviously we can also define multiple points in this 3D space. Two such points can be connected using a line (also known as a vector), and three such points can be connected to form a triangle which brings us to basic building element of the rest of the 3D pipeline. A point in 3D Space is usually referred to as a â€œvertexâ€, and you need three â€œverticesâ€ to build a triangle in 3D space: Triangle in 3D Space

Triangles are social creatures; they like to show up in groups. Using a set of vertices that form multiple triangles itâ€™s possible to start building 3D objects. For example we need two triangles or six vertices to form a quad, a cube has six sides each side is a quad so you need 2*6=12 triangles to define a cube in space and for 12 triangles you need to have 36 vertices in 3D Space (obviously not all these vertices are different, there are only 8 unique vertices in a cube). Cube in 3D Space

And anyone who has played with Legoâ„¢ knows that once you have blocks you can build anything you want. If you can build a cube you can build anything. For example the model below exists of thousands of triangles and these triangles are built from a large set of vertices: NVIDIA's Wolfman, built from thousands of triangles and vertices

So now that we know that vertices are at the origin of any object in 3D space we can concentrate on just one such basic element. Because anything we do with one single vertex in 3D space, we can do to all the others. And if we change the vertices we also change the triangles and if we change the triangles we change the object that they form!