
Barycentric coordinates
Barycentric coordinates are a way to describe a point's position inside a triangle using weights relative to its vertices. Imagine you have a triangle with vertices A, B, and C. To locate a point P inside the triangle, you assign numbers (coordinates) to how much P is "towards" each vertex—these numbers are the barycentric coordinates. If the weights are equal, P is at the center; if one weight dominates, P is closer to that vertex. The sum of these weights always equals 1, making barycentric coordinates a flexible tool for interpolation and analysis within triangles.