Game dev
Saved & recent

Barycentric coordinates

Related terms: interpolation across a triangle, point in triangle

A way to describe a point inside a triangle as a mix of its three corners. The three weights add up to 1. At a corner, that corner's weight is 1 and the others are 0.

This is how the rasterizer blends UVs, normals and colors across a triangle. It is also the standard inside test: a point is in the triangle when all three weights are between 0 and 1.

Further reading
Scratchapixel: Barycentric coordinates
25% A 35% B 40% C P
Each barycentric weight equals the area of the subtriangle opposite its vertex divided by the total area.

View in the full Game dev collection