Barycentric Coordinates — Definition, Formula & Examples
Barycentric coordinates describe the location of a point relative to a triangle by assigning a weight to each vertex. A point's position is the weighted average of the three vertices, where the weights sum to 1.
Given a triangle with vertices , , , the barycentric coordinates of a point are scalars such that and . When all three coordinates are non-negative, lies inside or on the boundary of the triangle.
Key Formula
Where:
- = The point being described
- = The three vertices of the reference triangle
- = Weights (barycentric coordinates) assigned to each vertex
How It Works
Each barycentric coordinate represents the ratio of the sub-triangle area opposite that vertex to the total triangle area. For instance, equals the area of triangle divided by the area of triangle . If sits exactly at vertex , its coordinates are . The centroid of the triangle always has coordinates . A negative coordinate means the point lies outside the triangle, on the far side of the opposite edge.
Worked Example
Problem: A triangle has vertices , , . Find the Cartesian position of the point with barycentric coordinates .
Step 1: Apply the formula using the given weights.
Step 2: Compute each weighted term and add.
Step 3: Verify the weights sum to 1: . The point lies inside the triangle since all coordinates are positive.
Answer: The point is at Cartesian coordinates .
Why It Matters
Barycentric coordinates are essential in computer graphics for texture mapping, ray-triangle intersection tests, and interpolating color or depth across a triangle. In physics, they locate a system's center of mass. They also simplify many classic triangle geometry proofs by replacing distance-based reasoning with algebraic ratios.
Common Mistakes
Mistake: Forgetting that the three coordinates must sum to 1 for normalized barycentric coordinates.
Correction: Always check . If you compute unnormalized weights (e.g., sub-triangle areas), divide each by the total triangle area to normalize.
