Barycentric coordinate system
In geometry, the barycentric coordinate system is a coordinate system in which the location of a point of a simplex (a triangle, tetrahedron, etc.) is specified as the center of mass, or barycenter, of usually unequal masses placed at its vertices. Coordinates also extend outside the simplex, where one or more coordinates become negative. The system was introduced in 1827 by August Ferdinand Möbius.
- 1 Definition
- 2 Barycentric coordinates on triangles
- 2.1 Conversion between barycentric and Cartesian coordinates
- 2.2 Conversion between barycentric and trilinear coordinates
- 2.3 Equations in barycentric coordinates
- 2.4 Distance between points
- 2.5 Applications
- 2.6 Examples of special points
- 3 Barycentric coordinates on tetrahedra
- 4 Generalized barycentric coordinates
- 5 See also
- 6 References
- 7 External links
and at least one of does not vanish then we say that the coefficients ( ) are barycentric coordinates of with respect to . The vertices themselves have the coordinates . Barycentric coordinates are not unique: for any b not equal to zero, ( ) are also barycentric coordinates of p.
When the coordinates are not negative, the point lies in the convex hull of , that is, in the simplex which has those points as its vertices.
Barycentric coordinates, as defined above, are a form of homogeneous coordinates: indeed, the "usual" homogeneous coordinates are the barycentric coordinates defined in the extended affine n-space on the simplex whose vertices are the points at infinity on the coordinate axes, plus the origin. Sometimes values of coordinates are restricted with a condition
Barycentric coordinates on trianglesEdit
This section may be confusing or unclear to readers. In particular, it is unnecessarily technical and complicated. (December 2018) (Learn how and when to remove this template message)
In the context of a triangle, barycentric coordinates are also known as area coordinates or areal coordinates, because the coordinates of P with respect to triangle ABC are equivalent to the (signed) ratios of the areas of PBC, PCA and PAB to the area of the reference triangle ABC. Areal and trilinear coordinates are used for similar purposes in geometry.
Barycentric or areal coordinates are extremely useful in engineering applications involving triangular subdomains. These make analytic integrals often easier to evaluate, and Gaussian quadrature tables are often presented in terms of area coordinates.
Consider a triangle defined by its three vertices, , and . Each point located inside this triangle can be written as a unique convex combination of the three vertices. In other words, for each there is a unique sequence of three numbers, such that and
The three numbers indicate the "barycentric" or "area" coordinates of the point with respect to the triangle. They are often denoted as instead of . Note that although there are three coordinates, there are only two degrees of freedom, since . Thus every point is uniquely defined by any two of the barycentric coordinates.
To explain why these coordinates are signed ratios of areas, let us assume that we work in the Euclidean space . Here, consider the Cartesian coordinate system and its associated basis, namely . Consider also the positively oriented triangle lying in the plane. It is known that for any basis of and any free vector one has
where stands for the mixed product of these three vectors.
Take , where is an arbitrary point in the plane , and remark that
We have obtained that
and so the numerators of and are the doubles of the signed areas of triangles and respectively .
Further, we deduce that
which means that the numbers , and are the barycentric coordinates of . Similarly, the third barycentric coordinate reads as
This -letter notation of the barycentric coordinates comes from the fact that the point may be interpreted as the center of mass for the masses , , which are located in , and .
Switching back and forth between the barycentric coordinates and other coordinate systems makes some problems much easier to solve.
Conversion between barycentric and Cartesian coordinatesEdit
Given a point in a triangle's plane one can obtain the barycentric coordinates , and from the Cartesian coordinates or vice versa.
We can write the Cartesian coordinates of the point in terms of the Cartesian components of the triangle vertices , , where and in terms of the barycentric coordinates of as
That is, the Cartesian coordinates of any point are a weighted average of the Cartesian coordinates of the triangle's vertices, with the weights being the point's barycentric coordinates summing to unity.
To find the reverse transformation, from Cartesian coordinates to barycentric coordinates, we first substitute into the above to obtain
Rearranging, this is
This linear transformation may be written more succinctly as
Now the matrix is invertible, since and are linearly independent (if this were not the case, then , , and would be collinear and would not form a triangle). Thus, we can rearrange the above equation to get
Finding the barycentric coordinates has thus been reduced to finding the 2×2 inverse matrix of , an easy problem.
Explicitly, the formulae for the barycentric coordinates of point in terms of its Cartesian coordinates (x, y) and in terms of the Cartesian coordinates of the triangle's vertices are:
Another way to solve the conversion from Cartesian to barycentric coordinates is to rewrite the problem in matrix form so that
with and . Then, the condition reads and the barycentric coordinates can be solved as the solution of the linear system
Conversion between barycentric and trilinear coordinatesEdit
A point with trilinear coordinates x : y : z has barycentric coordinates ax : by : cz where a, b, c are the side lengths of the triangle. Conversely, a point with barycentrics has trilinears
Equations in barycentric coordinatesEdit
The sides a, b, c respectively have equations
Using the previously given conversion between barycentric and trilinear coordinates, the various other equations given in Trilinear coordinates#Formulas can be rewritten in terms of barycentric coordinates.
Distance between pointsEdit
The displacement vector of two normalized points and is
where a, b, c are the sidelengths of the triangle. The equivalence of the last two expressions follows from which holds because
The barycentric coordinates of a point can be calculated based on distances di to the three triangle vertices by solving the equation
Determining location with respect to a triangleEdit
Although barycentric coordinates are most commonly used to handle points inside a triangle, they can also be used to describe a point outside the triangle. If the point is not inside the triangle, then we can still use the formulas above to compute the barycentric coordinates. However, since the point is outside the triangle, at least one of the coordinates will violate our original assumption that . In fact, given any point in cartesian coordinates, we can use this fact to determine where this point is with respect to a triangle.
If a point lies in the interior of the triangle, all of the Barycentric coordinates lie in the open interval If a point lies on an edge of the triangle but not at a vertex, one of the area coordinates (the one associated with the opposite vertex) is zero, while the other two lie in the open interval If the point lies on a vertex, the coordinate associated with that vertex equals 1 and the others equal zero. Finally, if the point lies outside the triangle at least one coordinate is negative.
- Point lies inside the triangle if and only if .
- lies on the edge or corner of the triangle if and .
- Otherwise, lies outside the triangle.
In particular, if a point lies on the opposite side of a sideline from the vertex opposite that sideline, then that point's barycentric coordinate corresponding to that vertex is negative.
Interpolation on a triangular unstructured gridEdit
If are known quantities, but the values of inside the triangle defined by is unknown, they can be approximated using linear interpolation. Barycentric coordinates provide a convenient way to compute this interpolation. If is a point inside the triangle with barycentric coordinates , , , then
In general, given any unstructured grid or polygon mesh, this kind of technique can be used to approximate the value of at all points, as long as the function's value is known at all vertices of the mesh. In this case, we have many triangles, each corresponding to a different part of the space. To interpolate a function at a point , first a triangle must be found that contains . To do so, is transformed into the barycentric coordinates of each triangle. If some triangle is found such that the coordinates satisfy , then the point lies in that triangle or on its edge (explained in the previous section). Then the value of can be interpolated as described above.
These methods have many applications, such as the finite element method (FEM).
Integration over a triangleEdit
The integral of a function over the domain of the triangle can be annoying to compute in a cartesian coordinate system. One generally has to split the triangle up into two halves, and great messiness follows. Instead, it is often easier to make a change of variables to any two barycentric coordinates, e.g. . Under this change of variables,
where is the area of the triangle. This result follows from the fact that a rectangle in barycentric coordinates corresponds to a quadrilateral in cartesian coordinates, and the ratio of the areas of the corresponding shapes in the corresponding coordinate systems is given by .
Examples of special pointsEdit
where a, b, c are edge lengths BC, CA, AB respectively of the triangle.
Barycentric coordinates on tetrahedraEdit
Barycentric coordinates may be easily extended to three dimensions. The 3D simplex is a tetrahedron, a polyhedron having four triangular faces and four vertices. Once again, the barycentric coordinates are defined so that the first vertex maps to barycentric coordinates , , etc.
This is again a linear transformation, and we may extend the above procedure for triangles to find the barycentric coordinates of a point with respect to a tetrahedron:
where is now a 3×3 matrix:
Once again, the problem of finding the barycentric coordinates has been reduced to inverting a 3×3 matrix. 3D barycentric coordinates may be used to decide if a point lies inside a tetrahedral volume, and to interpolate a function within a tetrahedral mesh, in an analogous manner to the 2D procedure. Tetrahedral meshes are often used in finite element analysis because the use of barycentric coordinates can greatly simplify 3D interpolation.
Generalized barycentric coordinatesEdit
This section does not cite any sources. (December 2010) (Learn how and when to remove this template message)
Barycentric coordinates (a1, ..., an) that are defined with respect to a polytope instead of a simplex are called generalized barycentric coordinates. For these, the equation
is still required to hold where x1, ..., xn are the vertices of the given polytope. Thus, the definition is formally unchanged but while a simplex with n vertices needs to be embedded in a vector space of dimension of at least n-1, a polytope may be embedded in a vector space of lower dimension. The simplest example is a quadrilateral in the plane. Consequently, even normalized generalized barycentric coordinates (i.e. coordinates such that the sum of the coefficients is 1) are in general not uniquely determined anymore while this is the case for normalized barycentric coordinates with respect to a simplex.
More abstractly, generalized barycentric coordinates express a polytope with n vertices, regardless of dimension, as the image of the standard -simplex, which has n vertices – the map is onto: 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 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 -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 as the standard object for vector spaces, and the standard affine hyperplane 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.
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 
- Hille, Einar. "Analytic Function Theory, Volume I", Second edition, fifth printing. Chelsea Publishing Company, New York, 1982, ISBN 0-8284-0269-8, page 33, footnote 1
- Deaux, Roland. "Introduction to The Geometry of Complex Numbers". Dover Publications, Inc., Mineola, 2008, ISBN 978-0-486-46629-3, page 61
- Danby, J.M.A. "Fundamentals of Celestial Mechanics", Second edition, revised & enlarged, fifth printing. Willmann-Bell, Inc., Richmond, 2003, ISBN 0-943396-20-4, page 26, problem 11
- Scott, J. A. "Some examples of the use of areal coordinates in triangle geometry", Mathematical Gazette 83, November 1999, 472–477.
- Schindler, Max; Chen, Evan (July 13, 2012). "Barycentric Coordinates in Olympiad Geometry" (PDF). Retrieved 14 January 2016.
- Clark Kimberling's Encyclopedia of Triangles "Encyclopedia of Triangle Centers". Archived from the original on 2012-04-19. Retrieved 2012-06-02.
- Wolfram page on barycentric coordinates
- Dasari Naga, Vijay Krishna, "On the Feuerbach triangle", Forum Geometricorum 17 (2017), 289–300: p. 289. http://forumgeom.fau.edu/FG2017volume17/FG201731.pdf
- ONUFRIEV, VG; DENISIK, SA; FERRONSKY, VI, BARICENTRIC MODELS IN ISOTOPE STUDIES OF NATURAL-WATERS. NUCLEAR GEOPHYSICS, 4, 111-117 (1990)
- Bradley, Christopher J. (2007). The Algebra of Geometry: Cartesian, Areal and Projective Co-ordinates. Bath: Highperception. ISBN 978-1-906338-00-8.
- Coxeter, H.S.M. (1969). Introduction to geometry (2nd ed.). John Wiley and Sons. pp. 216–221. ISBN 978-0-471-50458-0. Zbl 0181.48101.
- Barycentric Calculus In Euclidean And Hyperbolic Geometry: A Comparative Introduction, Abraham Ungar, World Scientific, 2010
- Hyperbolic Barycentric Coordinates, Abraham A. Ungar, The Australian Journal of Mathematical Analysis and Applications, Vol.6, No.1, Article 18, pp. 1–35, 2009
- Weisstein, Eric W. "Areal Coordinates". MathWorld.
- Weisstein, Eric W. "Barycentric Coordinates". MathWorld.
- Barycentric coordinates computation in homogeneous coordinates, Vaclav Skala, Computers and Graphics, Vol.32, No.1, pp. 120–127, 2008
- The uses of homogeneous barycentric coordinates in plane euclidean geometry
- Barycentric Coordinates – a collection of scientific papers about (generalized) barycentric coordinates
- Barycentric coordinates: A Curious Application (solving the "three glasses" problem) at cut-the-knot
- Accurate point in triangle test
- Barycentric Coordinates in Olympiad Geometry by Evan Chen and Max Schindler
- Barycenter command and TriangleCurve command at Geogebra.