n | n-simplex | |

0 | point | |

1 | line segment | |

2 | triangle | |

3 | tetrahedron |

Barycentric (**bc**) coordinates use n+1 reals to locate a point in n-space relative to some n-simplex except that <0, ... 0> does not denote any point.
They are redundant for if a≠0 then <x_{0}, ... x_{n}> and <ax_{0}, ... ax_{n}> denote the same point.
In these pages we demand that ∑x_{i} = 1.
We adopt some point in our space as an origin to view it as a vector space.
∑x_{i}p_{i} = <x_{0}, ... x_{n}> where
{p_{0}, ... p_{n}} are the vertices of the simplex.

The vertices of the simplex have bc coordinates
p_{0} = <1, 0, 0, ...>,
p_{1} = <0, 1, 0, ...>,
p_{2} = <0, 0, 1, ...>,
...
p_{n} = <0, 0, 0, ... 1>.
If all of the coordinates are positive then the point is in the open simplex and conversely.

We will speak of barycentric coordinates (**bcc**) but suppress the detail of whether we carry n or n+1 numbers as a tactical detail that detracts from geometric presentation.
That confusion will certainly plague us later in the code.

If we take p_{0} as the origin of our space and we omit x_{0} from our coordinate set, then the basis vectors for the resulting coordinate system are the edges of the simplex that
emanate from p_{0}.
For 0<j≤n the n vectors p_{j} − p_{0} form a set of basis vectors for a coordinate system with coordinates x_{1} ... x_{n}.
In this system the open simplex is

{<x_{1}, ... x_{n}> | (0<j≤n → x_{j} > 0) & ∑x_{i} ≤ 1}.

We may use bcc to denote velocity.
We denote velocity with derivatives of the coordinates of the moving point.
It the coordinates of the moving point are p_{i} then ∂p_{i}/∂t denote the velocity.
While ∑p_{i} = 1, ∑(∂p_{i}/∂t) = ∂(∑p_{i})/∂t = ∂1/∂t = 0.
Interpreting a set of n+1 numbers to know a position or velocity must avoid the following confusion.
Since they are redundant one of the numbers is normally discarded.
If the ith component is ignored then the n basis vectors constituted by edges meeting vertex i, with origin there must be used.
If a velocity is represented then each edge meting vertex i must be taken as a member of the basis set that spans the vector space of velocities.
For redundant velocity coordinates, coordinate j be taken as a rate that the point is receding from facet j, normalized to altitude j of the zone.

These coordinates are in general oblique but there is a particularly simple way to compute the metric tensor for oblique barycentric coördinates from the edge lengths of the simplex. Tricks with the metric tensor, familiar from differential geometry, make doing numerical geometry easy in these coordinates. Here is some code using these ideas to compute dihedral and trihedral angles in arbitrary simplexes.

Contrast Barycentric Coordinates with Trilinear Coordinates.