thumb|upright=1.3|Barycentric coordinates <math>(\lambda_1, \lambda_2, \lambda_3)</math> on an equilateral triangle and on a right triangle
thumb|A 3-simplex, with barycentric subdivisions of 1-faces (edges) 2-faces (triangles) and 3-faces (body)
In geometry, a barycentric coordinate system is a coordinate system in which the location of a point is specified by reference to a simplex (a triangle for points in a plane, a tetrahedron for points in three-dimensional space, etc.). The barycentric coordinates of a point can be interpreted as masses placed at the vertices of the simplex, such that the point is the center of mass (or barycenter) of these masses. These masses can be zero or negative; they are all positive if and only if the point is strictly inside the simplex.
Every point has barycentric coordinates, and their sum is never zero. Two tuples of barycentric coordinates specify the same point if and only if they are proportional; that is to say, if one tuple can be obtained by multiplying the elements of the other tuple by the same non-zero number. Therefore, barycentric coordinates are either considered to be defined up to multiplication by a nonzero constant, or normalized for summing to unity.
Barycentric coordinates were introduced by August Möbius in 1827. They are special homogeneous coordinates. Barycentric coordinates are strongly related with Cartesian coordinates and, more generally, to affine coordinates ().
Barycentric coordinates are particularly useful in triangle geometry for studying properties that do not depend on the angles of the triangle, such as Ceva's theorem, Routh's theorem, and Menelaus's theorem. In computer-aided design, they are useful for defining some kinds of Bézier surfaces.
Definition
Let <math>A_0, \ldots, A_n</math> be points in a Euclidean space, a flat or an affine space <math>\mathbf A</math> of dimension that are affinely independent; this means that there is no affine subspace of dimension that contains all the points, or, equivalently that the points define a simplex. Given any point <math>P\in \mathbf A,</math> there are scalars <math>a_0, \ldots, a_n</math> that are not all zero, such that
<math display=block> ( a_0 + \cdots + a_n ) \overset{}\overrightarrow{OP} = a_0 \overset{}\overrightarrow {OA_0} + \cdots + a_n \overset{}\overrightarrow {OA_n}, </math>
for any point . (As usual, the notation <math>\overset{}\overrightarrow {AB}</math> represents the translation vector or free vector that maps the point to the point .)
The elements of a tuple <math>(a_0: \dotsc: a_n)</math> that satisfies this equation are called barycentric coordinates of with respect to <math>A_0, \ldots, A_n.</math> The use of colons in the notation of the tuple means that barycentric coordinates are a sort of homogeneous coordinates, that is, the point is not changed if all coordinates are multiplied by the same nonzero constant. Moreover, the barycentric coordinates are also not changed if the auxiliary point , the origin, is changed.
The barycentric coordinates of a point are unique up to a scaling. That is, two tuples <math>(a_0: \dotsc: a_n)</math> and <math>(b_0: \dotsc: b_n)</math> are barycentric coordinates of the same point if and only if there is a nonzero scalar <math>\lambda</math> such that <math>b_i=\lambda a_i</math> for every .
In some contexts, it is useful to constrain the barycentric coordinates of a point so that they are unique. This is usually achieved by imposing the condition
<math display=block>\sum a_i = 1,</math>
or equivalently by dividing every <math>a_i</math> by the sum of all <math>a_i.</math> These specific barycentric coordinates are called normalized or absolute barycentric coordinates. Sometimes, they are also called affine coordinates, although this term refers commonly to a slightly different concept.
Sometimes, it is the normalized barycentric coordinates that are called barycentric coordinates. In this case the above defined coordinates are called homogeneous barycentric coordinates.
With above notation, the homogeneous barycentric coordinates of are all zero, except the one of index . When working over the real numbers (the above definition is also used for affine spaces over an arbitrary field), the points whose all normalized barycentric coordinates are nonnegative form the convex hull of <math>\{A_0, \ldots, A_n\},</math> which is the simplex that has these points as its vertices.
With above notation, a tuple <math>(a_1, \ldots, a_n)</math> such that
<math display=block>\sum_{i=0}^n a_i=0</math>
does not define any point, but the vector
<math display=block> a_0 \overset{}\overrightarrow {OA_0} + \cdots + a_n \overset{}\overrightarrow {OA_n}</math>
is independent from the origin . As the direction of this vector is not changed if all <math>a_i</math> are multiplied by the same scalar, the homogeneous tuple <math>(a_0: \dotsc: a_n)</math> defines a direction of lines, that is a point at infinity. See below for more details.
Relationship with Cartesian or affine coordinates
Barycentric coordinates are strongly related to Cartesian coordinates and, more generally, affine coordinates. For a space of dimension , these coordinate systems are defined relative to a point , the origin, whose coordinates are zero, and points <math>A_1, \ldots, A_n,</math> whose coordinates are zero except that of index that equals one.
A point has coordinates
<math display=block>(x_1, \ldots, x_n)</math>
for such a coordinate system if and only if its normalized barycentric coordinates are
<math display=block>(1-x_1-\cdots - x_n,x_1, \ldots, x_n)</math>
relatively to the points <math>O, A_1, \ldots, A_n.</math>
The main advantage of barycentric coordinate systems is to be symmetric with respect to the defining points. They are therefore often useful for studying properties that are symmetric with respect to points. On the other hand, distances and angles are difficult to express in general barycentric coordinate systems, and when they are involved, it is generally simpler to use a Cartesian coordinate system.
Relationship with projective coordinates
Homogeneous barycentric coordinates are also strongly related with some projective coordinates. However this relationship is more subtle than in the case of affine coordinates, and, for being clearly understood, requires a coordinate-free definition of the projective completion of an affine space, and a definition of a projective frame.
The projective completion of an affine space of dimension is a projective space of the same dimension that contains the affine space as the complement of a hyperplane. The projective completion is unique up to an isomorphism. The hyperplane is called the hyperplane at infinity, and its points are the points at infinity of the affine space.
Given a projective space of dimension , a projective frame is an ordered set of points that are not contained in the same hyperplane. A projective frame defines a projective coordinate system such that the coordinates of the th point of the frame are all equal, and, otherwise, all coordinates of the th point are zero, except the th one.
<math display=block>\begin{array}{rccccc}
A = & 1 &:& 0 &:& 0 \\
B = & 0 &:& 1 &:& 0 \\
C = & 0 &:& 0 &:& 1
\end{array}</math>
The centroid would be at <math>\tfrac{1}{3}:\tfrac{1}{3}:\tfrac{1}{3}</math>
<math display=block>\begin{array}{rccccc}
& \sin 2\alpha &:& \sin 2\beta &:& \sin 2\gamma \\[2pt]
=& 1-\cot\beta\cot\gamma &:& 1-\cot\gamma\cot\alpha &:& 1-\cot\alpha\cot\beta \\[2pt]
=& a^2(-a^2+b^2+c^2) &:& b^2(a^2-b^2+c^2) &:& c^2(a^2+b^2-c^2)
\end{array}</math>
The orthocenter has coordinates
The excenters have coordinates Usually one uses normalized coordinates, <math>\lambda_1 + \lambda_2 + \cdots + \lambda_k = 1</math>. As for the case of a simplex, the points with nonnegative normalized generalized coordinates (<math>0 \le \lambda_i \le 1</math>) form the convex hull of . If there are more points than in a full simplex (<math>k > n + 1</math>) the generalized barycentric coordinates of a point are not unique, as the defining linear system (here for n=2)<math display="block">
\left(\begin{matrix}
1 & 1 & 1 & ... \\
x_1 & x_2 & x_3 & ... \\
y_1 & y_2 & y_3 & ...
\end{matrix}\right)
\begin{pmatrix}
\lambda_1 \\ \lambda_2 \\ \lambda_3 \\ \vdots
\end{pmatrix} =
\left(\begin{matrix}
1\\x\\y
\end{matrix}\right)
</math>is underdetermined. The simplest example is a quadrilateral in the plane. Various kinds of additional restrictions can be used to define unique barycentric coordinates.
Abstraction
More abstractly, generalized barycentric coordinates express a convex polytope with n vertices, regardless of dimension, as the image of the standard <math>(n-1)</math>-simplex, which has n vertices – the map is onto: <math>\Delta^{n-1} \twoheadrightarrow P.</math> The map is one-to-one if and only if the polytope is a simplex, in which case the map is an isomorphism; this corresponds to a point not having unique generalized barycentric coordinates except when P is a simplex.
Dual to generalized barycentric coordinates are slack variables, which measure by how much margin a point satisfies the linear constraints, and gives an embedding <math>P \hookrightarrow (\mathbf{R}_{\geq 0})^f</math> into the f-orthant, where f is the number of faces (dual to the vertices). This map is one-to-one (slack variables are uniquely determined) but not onto (not all combinations can be realized).
This use of the standard <math>(n-1)</math>-simplex and f-orthant as standard objects that map to a polytope or that a polytope maps into should be contrasted with the use of the standard vector space <math>K^n</math> as the standard object for vector spaces, and the standard affine hyperplane <math>\{(x_0,\ldots,x_n) \mid \sum x_i = 1\} \subset K^{n+1}</math> as the standard object for affine spaces, where in each case choosing a linear basis or affine basis provides an isomorphism, allowing all vector spaces and affine spaces to be thought of in terms of these standard spaces, rather than an onto or one-to-one map (not every polytope is a simplex). Further, the n-orthant is the standard object that maps to cones.
Applications
alt=Barycentric coordinates are used for blending three colors over a triangular region evenly in computer graphics.|thumb|Barycentric coordinates are used for blending three colors over a triangular region evenly in computer graphics.
Generalized barycentric coordinates have applications in computer graphics and more specifically in geometric modelling. Often, a three-dimensional model can be approximated by a polyhedron such that the generalized barycentric coordinates with respect to that polyhedron have a geometric meaning. In this way, the processing of the model can be simplified by using these meaningful coordinates. Barycentric coordinates are also used in geophysics.
See also
- Ternary plot
- Convex combination
- Water pouring puzzle
- Homogeneous coordinates
- Barycentric algebra
