Gradient of the Barycentric Coordinate in 2D

I always forget this fact, so hopefully typing this out will help.

Let T be a triangle with vertices v_1, v_2, v_3, then there exists unique linear functions \lambda_i such that \lambda_i(v_j) = \delta_{ij}. This is the so called barycentric coordinates.

The fact here is that \nabla \lambda_k = -\frac{|\gamma_k|}{2|T|}n_k where |\gamma_k| is the length of the edge opposite vertex v_k, and |T| is the area of the triangle. The vector n_k is the unit outward normal.

The derivation is simple. The direction of the gradient is towards the highest growth, and as the barycentric coordinates are linear functions, it’s clear that -n_k is the correct direction. The scaling is to simply note the area as d|\gamma_k| = 2 |T| where d is the shortest distance from the edge to the vertex. This gives us the inverse of the slop as the barycentric coordinate has a value of 1 at the vertex.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.