Barycentric Coordinates


The concept of barycentric coordinates comes up quite often in computer graphics applications. For example, given a textured 3D model, each face of the model needs some kind of mapping to the texture to know how it should appear. For a 3D model composed of 2D polygon faces, we need a way to describe the location of any 2D point on a face. Barycentric coordinates provide such a method to describe the relative location of a point on a face. Understanding what they are and how they work is integral to shading and rendering in particular.

Barycentric coordinates

To put it simply, barycentric coordinates are a local coordinate system for a triangle of geometry. They describe a single point on a triangle face as a combination of the three vertices of the triangle. In other words, for a triangle with vertices AA, BB, and CC (in counterclockwise order), they describe how close a point PP is to AA, BB, and CC within the plane formed by that face.

Reasoning about barycentric coordinates

Imagine three springs and three points AA, BB, and CC. Tie the end of the first spring to the point AA, the end of the second spring to the point BB, and the end of the third spring to the point CC. Next, take the free end of all three springs and tie them to the point PP. Notice how the springs joined by PP divide the triangle into three smaller triangles. As PP moves around, the shape of these triangles changes. We’ll denote the three subtriangles formed by PP as uu, vv, and ww.

Get hands-on with 1200+ tech skills courses.