Barycentric coordinates (mathematics)
   HOME

TheInfoList



OR:

In
geometry Geometry (; ) is, with arithmetic, one of the oldest branches of mathematics. It is concerned with properties of space such as the distance, shape, size, and relative position of figures. A mathematician who works in the field of geometry is ...
, a barycentric coordinate system is a coordinate system in which the location of a point is specified by reference to a simplex (a
triangle A triangle is a polygon with three edges and three vertices. It is one of the basic shapes in geometry. A triangle with vertices ''A'', ''B'', and ''C'' is denoted \triangle ABC. In Euclidean geometry, any three points, when non- colline ...
for points in a
plane Plane(s) most often refers to: * Aero- or airplane, a powered, fixed-wing aircraft * Plane (geometry), a flat, 2-dimensional surface Plane or planes may also refer to: Biology * Plane (tree) or ''Platanus'', wetland native plant * ''Planes' ...
, a
tetrahedron In geometry, a tetrahedron (plural: tetrahedra or tetrahedrons), also known as a triangular pyramid, is a polyhedron composed of four triangular faces, six straight edges, and four vertex corners. The tetrahedron is the simplest of all th ...
for points in
three-dimensional space Three-dimensional space (also: 3D space, 3-space or, rarely, tri-dimensional space) is a geometric setting in which three values (called ''parameters'') are required to determine the position of an element (i.e., point). This is the informa ...
, etc.). The barycentric coordinates of a point can be interpreted as
mass Mass is an intrinsic property of a body. It was traditionally believed to be related to the quantity of matter in a physical body, until the discovery of the atom and particle physics. It was found that different atoms and different eleme ...
es 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 inside the simplex. Every point has barycentric coordinates, and their sum is not zero. Two
tuple In mathematics, a tuple is a finite ordered list (sequence) of elements. An -tuple is a sequence (or ordered list) of elements, where is a non-negative integer. There is only one 0-tuple, referred to as ''the empty tuple''. An -tuple is defi ...
s 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 Ferdinand Möbius August Ferdinand Möbius (, ; ; 17 November 1790 – 26 September 1868) was a German mathematician and theoretical astronomer. Early life and education Möbius was born in Schulpforta, Electorate of Saxony, and was descended on hi ...
in 1827.Hille, Einar. "Analytic Function Theory, Volume I", Second edition, fifth printing. Chelsea Publishing Company, New York, 1982, , page 33, footnote 1 They are special
homogenous coordinates In mathematics, homogeneous coordinates or projective coordinates, introduced by August Ferdinand Möbius in his 1827 work , are a system of coordinates used in projective geometry, just as Cartesian coordinates are used in Euclidean geometry. ...
. Barycentric coordinates are strongly related with Cartesian coordinates and, more generally, to
affine coordinates In mathematics, an affine space is a geometric structure that generalizes some of the properties of Euclidean spaces in such a way that these are independent of the concepts of distance and measure of angles, keeping only the properties related ...
(see ). Barycentric coordinates are particularly useful in
triangle geometry A triangle is a polygon with three edges and three vertices. It is one of the basic shapes in geometry. A triangle with vertices ''A'', ''B'', and ''C'' is denoted \triangle ABC. In Euclidean geometry, any three points, when non-collin ...
for studying properties that do not depend on the angles of the triangle, such as
Ceva's theorem In Euclidean geometry, Ceva's theorem is a theorem about triangles. Given a triangle , let the lines be drawn from the vertices to a common point (not on one of the sides of ), to meet opposite sides at respectively. (The segments are kn ...
,
Routh's theorem In geometry, Routh's theorem determines the ratio of areas between a given triangle and a triangle formed by the pairwise intersections of three cevians. The theorem states that if in triangle ABC points D, E, and F lie on segments BC, CA, and ...
, and Menelaus's theorem. In computer-aided design, they are useful for defining some kinds of
Bézier surface Bézier surfaces are a species of mathematical spline used in computer graphics, computer-aided design, and finite element modeling. As with Bézier curves, a Bézier surface is defined by a set of control points. Similar to interpolation in man ...
s.


Definition

Let A_0, \ldots, A_n be points in a
Euclidean space Euclidean space is the fundamental space of geometry, intended to represent physical space. Originally, that is, in Euclid's ''Elements'', it was the three-dimensional space of Euclidean geometry, but in modern mathematics there are Euclidean ...
, a flat or an
affine space In mathematics, an affine space is a geometric structure that generalizes some of the properties of Euclidean spaces in such a way that these are independent of the concepts of distance and measure of angles, keeping only the properties related ...
\mathbf A of dimension that are affinely independent; this means that there is no
affine subspace In mathematics, an affine space is a geometric structure that generalizes some of the properties of Euclidean spaces in such a way that these are independent of the concepts of distance and measure of angles, keeping only the properties related ...
of dimension that contains all the points, or, equivalently that the points define a simplex. Given any point P\in \mathbf A, there are scalars a_0, \ldots, a_n that are not all zero, such that : ( a_0 + \cdots + a_n ) \overrightarrow = a_0 \overrightarrow + \cdots + a_n \overrightarrow , for any point . (As usual, the notation \overrightarrow represents the translation vector or
free vector In mathematics, physics, and engineering, a Euclidean vector or simply a vector (sometimes called a geometric vector or spatial vector) is a geometric object that has magnitude (or length) and direction. Vectors can be added to other vectors a ...
that maps the point to the point .) The elements of a tuple (a_0: \dotsc: a_n) that satisfies this equation are called ''barycentric coordinates'' of with respect to A_0, \ldots, A_n. The use of colons in the notation of the tuple means that barycentric coordinates are a sort of
homogeneous coordinates In mathematics, homogeneous coordinates or projective coordinates, introduced by August Ferdinand Möbius in his 1827 work , are a system of coordinates used in projective geometry, just as Cartesian coordinates are used in Euclidean geometry. ...
, 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 Origin(s) or The Origin may refer to: Arts, entertainment, and media Comics and manga * ''Origin'' (comics), a Wolverine comic book mini-series published by Marvel Comics in 2002 * ''The Origin'' (Buffy comic), a 1999 ''Buffy the Vampire Sl ...
, is changed. The barycentric coordinates of a point are unique up to a scaling. That is, two tuples (a_0: \dotsc: a_n) and (b_0: \dotsc: b_n) are barycentric coordinates of the same point
if and only if In logic and related fields such as mathematics and philosophy, "if and only if" (shortened as "iff") is a biconditional logical connective between statements, where either both statements are true or both are false. The connective is b ...
there is a nonzero scalar \lambda such that b_i=\lambda a_i for every . In some contexts, it is useful to make unique the barycentric coordinates of a point. This is obtained by imposing the condition :\sum a_i = 1, or equivalently by dividing every a_i by the sum of all a_i. These specific barycentric coordinates are called normalized or absolute barycentric coordinates.Deaux, Roland. "Introduction to The Geometry of Complex Numbers". Dover Publications, Inc., Mineola, 2008, , page 61 Sometimes, they are also called
affine coordinates In mathematics, an affine space is a geometric structure that generalizes some of the properties of Euclidean spaces in such a way that these are independent of the concepts of distance and measure of angles, keeping only the properties related ...
, 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 number In mathematics, a real number is a number that can be used to measure a ''continuous'' one-dimensional quantity such as a distance, duration or temperature. Here, ''continuous'' means that values can have arbitrarily small variations. Every ...
s (the above definition is also used for affine spaces over an arbitrary
field Field may refer to: Expanses of open ground * Field (agriculture), an area of land used for agricultural purposes * Airfield, an aerodrome that lacks the infrastructure of an airport * Battlefield * Lawn, an area of mowed grass * Meadow, a grass ...
), the points whose all normalized barycentric coordinates are nonnegative form the convex hull of \, which is the simplex that has these points as its vertices. With above notation, a tuple (a_1, \ldots, a_n) such that :\sum_^n a_i=0 does not define any point, but the vector : a_0 \overrightarrow + \cdots + a_n \overrightarrow is independent from the origin . As the direction of this vector is not changed if all a_i are multiplied by the same scalar, the homogeneous tuple (a_0: \dotsc: a_n) defines a direction of lines, that is a
point at infinity In geometry, a point at infinity or ideal point is an idealized limiting point at the "end" of each line. In the case of an affine plane (including the Euclidean plane), there is one ideal point for each pencil of parallel lines of the plane. Ad ...
. See below for more details.


Relationship with Cartesian or affine coordinates

Barycentric coordinates are strongly related to Cartesian coordinates and, more generally,
affine coordinates In mathematics, an affine space is a geometric structure that generalizes some of the properties of Euclidean spaces in such a way that these are independent of the concepts of distance and measure of angles, keeping only the properties related ...
. For a space of dimension , these coordinate systems are defined relative to a point , the
origin Origin(s) or The Origin may refer to: Arts, entertainment, and media Comics and manga * ''Origin'' (comics), a Wolverine comic book mini-series published by Marvel Comics in 2002 * ''The Origin'' (Buffy comic), a 1999 ''Buffy the Vampire Sl ...
, whose coordinates are zero, and points A_1, \ldots, A_n, whose coordinates are zero except that of index that equals one. A point has coordinates :(x_1, \ldots, x_n) for such a coordinate system if and only if its normalized barycentric coordinates are :(1-x_1-\cdots - x_n,x_1, \ldots, x_n) relatively to the points O, A_1, \ldots, A_n. 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 In algebraic geometry, a projective variety over an algebraically closed field ''k'' is a subset of some projective ''n''-space \mathbb^n over ''k'' that is the zero-locus of some finite family of homogeneous polynomials of ''n'' + 1 variables wi ...
of an
affine space In mathematics, an affine space is a geometric structure that generalizes some of the properties of Euclidean spaces in such a way that these are independent of the concepts of distance and measure of angles, keeping only the properties related ...
, 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 A complement is something that completes something else. Complement may refer specifically to: The arts * Complement (music), an interval that, when added to another, spans an octave ** Aggregate complementation, the separation of pitch-clas ...
of a hyperplane. The projective completion is unique up to an
isomorphism In mathematics, an isomorphism is a structure-preserving mapping between two structures of the same type that can be reversed by an inverse mapping. Two mathematical structures are isomorphic if an isomorphism exists between them. The word i ...
. The hyperplane is called the
hyperplane at infinity In geometry, any hyperplane ''H'' of a projective space ''P'' may be taken as a hyperplane at infinity. Then the set complement is called an affine space. For instance, if are homogeneous coordinates for ''n''-dimensional projective space, then ...
, and its points are the
points at infinity In geometry, a point at infinity or ideal point is an idealized limiting point at the "end" of each line. In the case of an affine plane (including the Euclidean plane), there is one ideal point for each pencil of parallel lines of the plane. Ad ...
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. When constructing the projective completion from an affine coordinate system, one defines commonly it with respect to a projective frame consisting of the intersections with the hyperplane at infinity of the
coordinate axes A Cartesian coordinate system (, ) in a plane is a coordinate system that specifies each point uniquely by a pair of numerical coordinates, which are the signed distances to the point from two fixed perpendicular oriented lines, measured i ...
, the origin of the affine space, and the point that has all its affine coordinates equal to one. This implies that the points at infinity have their last coordinate equal to zero, and that the projective coordinates of a point of the affine space are obtained by completing its affine coordinates by one as th coordinate. When one has points in an affine space that define a barycentric coordinate system, this is another projective frame of the projective completion that is convenient to choose. This frame consists of these points and their
centroid In mathematics and physics, the centroid, also known as geometric center or center of figure, of a plane figure or solid figure is the arithmetic mean position of all the points in the surface of the figure. The same definition extends to any ...
, that is the point that has all its barycentric coordinates equal. In this case, the homogeneous barycentric coordinates of a point in the affine space are the same as the projective coordinates of this point. A point is at infinity if and only if the sum of its coordinates is zero. This point is in the direction of the vector defined at the end of .


Barycentric coordinates on triangles

In the context of a
triangle A triangle is a polygon with three edges and three vertices. It is one of the basic shapes in geometry. A triangle with vertices ''A'', ''B'', and ''C'' is denoted \triangle ABC. In Euclidean geometry, any three points, when non- colline ...
, 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 In geometry, the trilinear coordinates of a point relative to a given triangle describe the relative directed distances from the three sidelines of the triangle. Trilinear coordinates are an example of homogeneous coordinates. The ratio is ...
are used for similar purposes in geometry. Barycentric or areal coordinates are extremely useful in engineering applications involving triangular subdomains. These make analytic
integrals In mathematics, an integral assigns numbers to functions in a way that describes displacement, area, volume, and other concepts that arise by combining infinitesimal data. The process of finding integrals is called integration. Along with d ...
often easier to evaluate, and
Gaussian quadrature In numerical analysis, a quadrature rule is an approximation of the definite integral of a function, usually stated as a weighted sum of function values at specified points within the domain of integration. (See numerical integration for mor ...
tables are often presented in terms of area coordinates. Consider a triangle T defined by its three vertices, \mathbf_, \mathbf_ and \mathbf_. Each point \mathbf located inside this triangle can be written as a unique
convex combination In convex geometry and vector algebra, a convex combination is a linear combination of points (which can be vectors, scalars, or more generally points in an affine space) where all coefficients are non-negative and sum to 1. In other w ...
of the three vertices. In other words, for each \mathbf there is a unique sequence of three numbers, \lambda_1,\lambda_2,\lambda_3\geq 0 such that \lambda_1+\lambda_2+\lambda_3=1 and :\mathbf = \lambda_ \mathbf_ + \lambda_ \mathbf_ + \lambda_ \mathbf_, The three numbers \lambda_1,\lambda_2,\lambda_3 indicate the "barycentric" or "area" coordinates of the point \mathbf with respect to the triangle. They are often denoted as \alpha,\beta,\gamma instead of \lambda_1,\lambda_2,\lambda_3. Note that although there are three coordinates, there are only two degrees of freedom, since \lambda_1+\lambda_2+\lambda_3=1. 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 \mathbf^. Here, consider the Cartesian coordinate system Oxyz and its associated
basis Basis may refer to: Finance and accounting * Adjusted basis, the net cost of an asset after adjusting for various tax-related items *Basis point, 0.01%, often used in the context of interest rates * Basis trading, a trading strategy consisting ...
, namely \. Consider also the positively oriented triangle ABC lying in the Oxy
plane Plane(s) most often refers to: * Aero- or airplane, a powered, fixed-wing aircraft * Plane (geometry), a flat, 2-dimensional surface Plane or planes may also refer to: Biology * Plane (tree) or ''Platanus'', wetland native plant * ''Planes' ...
. It is known that for any
basis Basis may refer to: Finance and accounting * Adjusted basis, the net cost of an asset after adjusting for various tax-related items *Basis point, 0.01%, often used in the context of interest rates * Basis trading, a trading strategy consisting ...
\ of \mathbf^ and any
free vector In mathematics, physics, and engineering, a Euclidean vector or simply a vector (sometimes called a geometric vector or spatial vector) is a geometric object that has magnitude (or length) and direction. Vectors can be added to other vectors a ...
\mathbf one hasDanby, J.M.A. "Fundamentals of Celestial Mechanics", Second edition, revised & enlarged, fifth printing. Willmann-Bell, Inc., Richmond, 2003, , page 26, problem 11 :\mathbf=\frac\cdot\left \mathbf,\mathbf,\mathbf)\mathbf+(\mathbf,\mathbf,\mathbf)\mathbf+(\mathbf,\mathbf,\mathbf)\mathbf\right where (\mathbf,\mathbf,\mathbf)=(\mathbf\times\mathbf)\cdot\mathbf stands for the
mixed product In geometry and algebra, the triple product is a product of three 3- dimensional vectors, usually Euclidean vectors. The name "triple product" is used for two different products, the scalar-valued scalar triple product and, less often, the vector ...
of these three vectors. Take \mathbf=\vec,\,\mathbf=\vec,\,\mathbf=\mathbf,\,\mathbf=\vec, where P is an arbitrary point in the plane Oxy, and remark that :(\mathbf,\mathbf,\mathbf)=(\vec\times\vec)\cdot\vec=(\vert\vec\times\vec\vert\mathbf)\cdot\vec = 0. A subtle point regarding our choice of free vectors: \mathbf is, in fact, the equipollence class of the
bound vector In mathematics, physics, and engineering, a Euclidean vector or simply a vector (sometimes called a geometric vector or spatial vector) is a geometric object that has magnitude (or length) and direction. Vectors can be added to other vectors ...
\vec. We have obtained that :\vec=m_B\cdot\vec+m_C\cdot\vec,\,\mbox\,m_B=\frac,\,m_C=\frac. Given the positive (
counterclockwise Two-dimensional rotation can occur in two possible directions. Clockwise motion (abbreviated CW) proceeds in the same direction as a clock's hands: from the top to the right, then down and then to the left, and back up to the top. The opposite ...
) orientation of triangle ABC, the
denominator A fraction (from la, fractus, "broken") represents a part of a whole or, more generally, any number of equal parts. When spoken in everyday English, a fraction describes how many parts of a certain size there are, for example, one-half, eight ...
of both m_B and m_C is precisely the double of the area of the triangle ABC. Also, :(\vec,\vec,\mathbf)=(\vec,\vec,\mathbf)\,\mbox\,(\vec,\vec,\mathbf)=(\vec,\vec,\mathbf) and so the numerators of m_B and m_C are the doubles of the signed areas of triangles APC and respectively ABP. Further, we deduce that :\vec=(1-m_B-m_C)\cdot\vec+m_B\cdot\vec+m_C\cdot\vec which means that the numbers 1-m_B-m_C, m_B and m_C are the barycentric coordinates of P. Similarly, the third barycentric coordinate reads as :m_A = 1 - m_B - m_C = \frac. This m-letter notation of the barycentric coordinates comes from the fact that the point P may be interpreted as the center of mass for the masses m_A, m_B, m_C which are located in A, B and C. Switching back and forth between the barycentric coordinates and other coordinate systems makes some problems much easier to solve.


Conversion between barycentric and Cartesian coordinates


Edge approach

Given a point \mathbf in a triangle's plane one can obtain the barycentric coordinates \lambda_, \lambda_ and \lambda_ from the Cartesian coordinates (x, y) or vice versa. We can write the Cartesian coordinates of the point \mathbf in terms of the Cartesian components of the triangle vertices \mathbf_1, \mathbf_2, \mathbf_3 where \mathbf_i = (x_i, y_i) and in terms of the barycentric coordinates of \mathbf as : \begin x = \lambda_ x_ + \lambda_ x_ + \lambda_ x_ \\ y = \lambda_ y_ + \lambda_ y_ + \lambda_ y_ \\ \end 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 \lambda_ = 1 - \lambda_ - \lambda_ into the above to obtain : \begin x = \lambda_ x_ + \lambda_ x_ + (1 - \lambda_ - \lambda_) x_ \\ y = \lambda_ y_ + \lambda_ y_ + (1 - \lambda_ - \lambda_) y_ \\ \end Rearranging, this is : \begin \lambda_(x_ - x_) + \lambda_(x_ - x_) + x_ - x = 0 \\ \lambda_(y_ - y_) + \lambda_(y_ - y_) + y_ - y = 0 \\ \end This
linear transformation In mathematics, and more specifically in linear algebra, a linear map (also called a linear mapping, linear transformation, vector space homomorphism, or in some contexts linear function) is a mapping V \to W between two vector spaces that pre ...
may be written more succinctly as : \mathbf \cdot \lambda = \mathbf-\mathbf_3 where \lambda is the
vector Vector most often refers to: *Euclidean vector, a quantity with a magnitude and a direction *Vector (epidemiology), an agent that carries and transmits an infectious pathogen into another living organism Vector may also refer to: Mathematic ...
of the first two barycentric coordinates, \mathbf is the
vector Vector most often refers to: *Euclidean vector, a quantity with a magnitude and a direction *Vector (epidemiology), an agent that carries and transmits an infectious pathogen into another living organism Vector may also refer to: Mathematic ...
of Cartesian coordinates, and \mathbf is a matrix given by : \mathbf = \left(\begin x_1-x_3 & x_2-x_3 \\ y_1-y_3 & y_2-y_3 \\ \end\right) Now the matrix \mathbf is
invertible In mathematics, the concept of an inverse element generalises the concepts of opposite () and reciprocal () of numbers. Given an operation denoted here , and an identity element denoted , if , one says that is a left inverse of , and that is ...
, since \mathbf_1-\mathbf_3 and \mathbf_2-\mathbf_3 are
linearly independent In the theory of vector spaces, a set of vectors is said to be if there is a nontrivial linear combination of the vectors that equals the zero vector. If no such linear combination exists, then the vectors are said to be . These concepts are ...
(if this were not the case, then \mathbf_1, \mathbf_2, and \mathbf_3 would be
collinear In geometry, collinearity of a set of points is the property of their lying on a single line. A set of points with this property is said to be collinear (sometimes spelled as colinear). In greater generality, the term has been used for aligned o ...
and would not form a triangle). Thus, we can rearrange the above equation to get : \left(\begin\lambda_1 \\ \lambda_2\end\right) = \mathbf^ ( \mathbf-\mathbf_3 ) Finding the barycentric coordinates has thus been reduced to finding the 2×2 inverse matrix of \mathbf, an easy problem. Explicitly, the formulae for the barycentric coordinates of point \mathbf in terms of its Cartesian coordinates (''x, y'') and in terms of the Cartesian coordinates of the triangle's vertices are: :\lambda_1=\frac=\frac\, , :\lambda_2=\frac=\frac\, , :\lambda_3=1-\lambda_1-\lambda_2\, .


Vertex approach

Another way to solve the conversion from Cartesian to barycentric coordinates is to write the relation in the matrix form \mathbf \boldsymbol = \mathbfwith \mathbf = \left(\begin \mathbf_1 , \mathbf_2 , \mathbf_3 \end\right) and \boldsymbol = \left(\lambda_1,\lambda_2,\lambda_3\right)^\top, i.e. \begin x_1 & x_2 & x_3\\ y_1 & y_2 & y_3 \end \begin \lambda_1 \\ \lambda_2 \\ \lambda_3 \end = \beginx\\y\end To get the unique normalized solution we need to add the condition \lambda_1 + \lambda_2 + \lambda_3 = 1. The barycentric coordinates are thus the solution of the
linear system In systems theory, a linear system is a mathematical model of a system based on the use of a linear operator. Linear systems typically exhibit features and properties that are much simpler than the nonlinear case. As a mathematical abstractio ...
\left(\begin 1 & 1 & 1 \\ x_1 & x_2 & x_3\\ y_1 & y_2 & y_3 \end\right) \begin \lambda_1 \\ \lambda_2 \\ \lambda_3 \end = \left(\begin 1\\x\\y \end\right) which is \begin \lambda_1 \\ \lambda_2 \\ \lambda_3 \end = \frac \begin x_2y_3-x_3y_2 & y_2-y_3 & x_3-x_2 \\ x_3y_1-x_1y_3 & y_3-y_1 & x_1-x_3 \\ x_1y_2-x_2y_1 & y_1-y_2 & x_2-x_1 \end\begin 1\\x\\y \end where 2A = \det(1, R) = x_1(y_2-y_3) + x_2(y_3-y_1) + x_3(y_1-y_2)is twice the signed area of the triangle. The area interpretation of the barycentric coordinates can be recovered by applying Cramer's rule to this linear system.


Conversion between barycentric and trilinear coordinates

A point with
trilinear coordinates In geometry, the trilinear coordinates of a point relative to a given triangle describe the relative directed distances from the three sidelines of the triangle. Trilinear coordinates are an example of homogeneous coordinates. The ratio is ...
''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 \lambda_1 : \lambda_2 : \lambda_3 has trilinears \lambda_1/a:\lambda_2/b:\lambda_3/c.


Equations in barycentric coordinates

The three sides ''a, b, c'' respectively have equations :\lambda_1=0, \quad \lambda_2=0, \quad \lambda_3=0. The equation of a triangle's
Euler line In geometry, the Euler line, named after Leonhard Euler (), is a line determined from any triangle that is not equilateral. It is a central line of the triangle, and it passes through several important points determined from the triangle, includ ...
is : \begin \lambda_1 & \lambda_2 & \lambda_3 \\1 & 1 & 1\\\tan A & \tan B & \tan C \end =0. 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 points

The displacement vector of two normalized points P=(p_1,p_2,p_3) and Q=(q_1,q_2,q_3) is :\overrightarrow=(p_1-q_1,p_2-q_2,p_3-q_3). The distance d between P and Q, or the length of the displacement vector \overrightarrow=(x,y,z), is :d^2=\left , P Q \right , ^2 = -a^2yz - b^2zx - c^2xy =\frac ^2(b^2+c^2-a^2)+y^2(c^2+a^2-b^2)+z^2(a^2+b^2-c^2) where ''a, b, c'' are the sidelengths of the triangle. The equivalence of the last two expressions follows from x+y+z=0, which holds because x+y+z=(p_1-q_1)+(p_2-q_2)+(p_3-q_3)=(p_1+p_2+p_3)-(q_1+q_2+q_3)=1-1=0. The barycentric coordinates of a point can be calculated based on distances ''d''''i'' to the three triangle vertices by solving the equation : \left(\begin -c^2 & c^2 & b^2-a^2\\ -b^2 & c^2-a^2 & b^2\\ 1 & 1 & 1 \end\right) \boldsymbol = \left(\begin d^2_A - d^2_B\\ d^2_A - d^2_C\\ 1 \end\right).


Applications


Determining location with respect to a triangle

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 \lambda_\geq 0. 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 (0,1). If a point lies on an edge of the triangle but not at a vertex, one of the area coordinates \lambda_ (the one associated with the opposite vertex) is zero, while the other two lie in the open interval (0,1). 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. Summarizing, :Point \mathbf lies inside the triangle
if and only if In logic and related fields such as mathematics and philosophy, "if and only if" (shortened as "iff") is a biconditional logical connective between statements, where either both statements are true or both are false. The connective is b ...
0 < \lambda_i < 1 \;\forall\; i \text . :\mathbf lies on the edge or corner of the triangle if 0 \leq \lambda_i \leq 1 \;\forall\; i \text and \lambda_i = 0\; \text . :Otherwise, \mathbf lies outside the triangle. In particular, if a point lies on the far side of a line the barycentric coordinate of the point in the triangle that is not on the line will have a negative value.


Interpolation on a triangular unstructured grid

If f(\mathbf_1),f(\mathbf_2),f(\mathbf_3) are known quantities, but the values of f inside the triangle defined by \mathbf_1,\mathbf_2,\mathbf_3 is unknown, they can be approximated using
linear interpolation In mathematics, linear interpolation is a method of curve fitting using linear polynomials to construct new data points within the range of a discrete set of known data points. Linear interpolation between two known points If the two known poi ...
. Barycentric coordinates provide a convenient way to compute this interpolation. If \mathbf is a point inside the triangle with barycentric coordinates \lambda_, \lambda_, \lambda_, then :f(\mathbf) \approx \lambda_1 f(\mathbf_1) + \lambda_2 f(\mathbf_2) + \lambda_3 f(\mathbf_3) In general, given any
unstructured grid An unstructured grid or irregular grid is a tessellation of a part of the Euclidean plane or Euclidean space by simple shapes, such as triangles or tetrahedra, in an irregular pattern. Grids of this type may be used in finite element analysis w ...
or
polygon mesh In 3D computer graphics and solid modeling, a polygon mesh is a collection of , s and s that defines the shape of a polyhedral object. The faces usually consist of triangles ( triangle mesh), quadrilaterals (quads), or other simple convex p ...
, this kind of technique can be used to approximate the value of f 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 f at a point \mathbf, first a triangle must be found that contains \mathbf. To do so, \mathbf is transformed into the barycentric coordinates of each triangle. If some triangle is found such that the coordinates satisfy 0 \leq \lambda_i \leq 1 \;\forall\; i \text 1,2,3, then the point lies in that triangle or on its edge (explained in the previous section). Then the value of f(\mathbf) can be interpolated as described above. These methods have many applications, such as the
finite element method The finite element method (FEM) is a popular method for numerically solving differential equations arising in engineering and mathematical modeling. Typical problem areas of interest include the traditional fields of structural analysis, heat ...
(FEM).


Integration over a triangle or tetrahedron

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 Change or Changing may refer to: Alteration * Impermanence, a difference in a state of affairs at different points in time * Menopause, also referred to as "the change", the permanent cessation of the menstrual period * Metamorphosis, or change, ...
to any two barycentric coordinates, e.g. \lambda_1,\lambda_2. Under this change of variables, : \int_ f(\mathbf) \ d\mathbf = 2A \int_^ \int_^ f(\lambda_ \mathbf_ + \lambda_ \mathbf_ + (1 - \lambda_ - \lambda_) \mathbf_) \ d\lambda_ \ d\lambda_ where A is the
area Area is the quantity that expresses the extent of a region on the plane or on a curved surface. The area of a plane region or ''plane area'' refers to the area of a shape or planar lamina, while '' surface area'' refers to the area of an ope ...
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 2A. Similarly, for integration over a tetrahedron, instead of breaking up the integral into two or three separate pieces, one could switch to 3D tetrahedral coordinates under the change of variables \int\int_ f(\mathbf) \ d\mathbf = 6V \int_^ \int_^ \int_ ^ f(\lambda_ \mathbf_ + \lambda_ \mathbf_ + \lambda_3 \mathbf_ + (1-\lambda_1-\lambda_2-\lambda_3)\mathbf_)\ d\lambda_ \ d\lambda_ \ d\lambda_ where V is the volume of the tetrahedron.


Examples of special points

The three vertices of a triangle have barycentric coordinates 1:0:0, 0:1:0, and 0:0:1.Scott, J. A. "Some examples of the use of areal coordinates in triangle geometry", ''
Mathematical Gazette ''The Mathematical Gazette'' is an academic journal of mathematics education, published three times yearly, that publishes "articles about the teaching and learning of mathematics with a focus on the 15–20 age range and expositions of attractive ...
'' 83, November 1999, 472–477.
The
centroid In mathematics and physics, the centroid, also known as geometric center or center of figure, of a plane figure or solid figure is the arithmetic mean position of all the points in the surface of the figure. The same definition extends to any ...
has barycentrics 1/3:1/3:1/3. The
circumcenter In geometry, the circumscribed circle or circumcircle of a polygon is a circle that passes through all the vertices of the polygon. The center of this circle is called the circumcenter and its radius is called the circumradius. Not every polyg ...
of a triangle ''ABC'' has barycentric coordinatesClark Kimberling's Encyclopedia of Triangles Wolfram page on barycentric coordinates
/ref> : a^2(-a^2 + b^2 + c^2):\;b^2(a^2 - b^2 + c^2):\;c^2(a^2 + b^2 - c^2) :=\sin 2A :\sin 2B:\sin 2C=(1-\cos B\cos C ):(1-\cos C\cos A):(1-\cos A\cos B). where are edge lengths respectively of the triangle. The
orthocenter In geometry, an altitude of a triangle is a line segment through a vertex and perpendicular to (i.e., forming a right angle with) a line containing the base (the side opposite the vertex). This line containing the opposite side is called the '' ...
has barycentric coordinates : (a^2 + b^2 - c^2)(a^2 - b^2 + c^2):\;(-a^2 + b^2 + c^2)(a^2 + b^2 - c^2):\;(a^2 - b^2 + c^2)(-a^2 + b^2 + c^2) :=\tan A:\tan B:\tan C=a\cos B\cos C:b\cos C\cos A:c\cos A\cos B. The
incenter In geometry, the incenter of a triangle is a triangle center, a point defined for any triangle in a way that is independent of the triangle's placement or scale. The incenter may be equivalently defined as the point where the internal angle bis ...
has barycentric coordinatesDasari Naga, Vijay Krishna, "On the Feuerbach triangle", ''Forum Geometricorum'' 17 (2017), 289–300: p. 289. http://forumgeom.fau.edu/FG2017volume17/FG201731.pdf :a:b:c=\sin A:\sin B:\sin C. The
excenter In geometry, the incircle or inscribed circle of a triangle is the largest circle that can be contained in the triangle; it touches (is tangent to) the three sides. The center of the incircle is a triangle center called the triangle's incenter. ...
s' barycentrics are :-a:b:c \quad \quad a:-b:c \quad \quad a:b:-c. The
nine-point center In geometry, the nine-point center is a triangle center, a point defined from a given triangle in a way that does not depend on the placement or scale of the triangle. It is so called because it is the center of the nine-point circle, a circle t ...
has barycentric coordinates :a\cos(B-C):b\cos (C-A):c\cos (A-B)=(1+\cos B\cos C):(1+\cos C\cos A):(1+\cos A\cos B) ::= ^2(b^2+c^2)-(b^2-c^2)^2 ^2(c^2+a^2)-(c^2-a^2)^2
^2(a^2+b^2)-(a^2-b^2)^2 In mathematics, a square is the result of multiplication, multiplying a number by itself. The verb "to square" is used to denote this operation. Squaring is the same as exponentiation, raising to the power 2 (number), 2, and is denoted by a ...
The
Gergonne point In geometry, the incircle or inscribed circle of a triangle is the largest circle that can be contained in the triangle; it touches (is tangent to) the three sides. The center of the incircle is a triangle center called the triangle's incenter. ...
of a triangle with the side lengths a, b, and c and
semiperimeter In geometry, the semiperimeter of a polygon is half its perimeter. Although it has such a simple derivation from the perimeter, the semiperimeter appears frequently enough in formulas for triangles and other figures that it is given a separate na ...
s has a value of (s-b)(s-c):(s-c)(s-a):(s-a)(s-b). The
Nagel point In geometry, the Nagel point (named for Christian Heinrich von Nagel) is a triangle center, one of the points associated with a given triangle whose definition does not depend on the placement or scale of the triangle. It is the point of concu ...
has a value of s-a:s-b:s-c. The
symmedian point In geometry, symmedians are three particular lines associated with every triangle. They are constructed by taking a median of the triangle (a line connecting a vertex with the midpoint of the opposite side), and reflecting the line over the co ...
is located at a^2:b^2:c^2 in the barycentric coordinate system of a triangle.


Barycentric coordinates on tetrahedra

Barycentric coordinates may be easily extended to
three dimensions Three-dimensional space (also: 3D space, 3-space or, rarely, tri-dimensional space) is a geometric setting in which three values (called ''parameters'') are required to determine the position of an element (i.e., point). This is the informa ...
. The 3D simplex is a
tetrahedron In geometry, a tetrahedron (plural: tetrahedra or tetrahedrons), also known as a triangular pyramid, is a polyhedron composed of four triangular faces, six straight edges, and four vertex corners. The tetrahedron is the simplest of all th ...
, a
polyhedron In geometry, a polyhedron (plural polyhedra or polyhedrons; ) is a three-dimensional shape with flat polygonal faces, straight edges and sharp corners or vertices. A convex polyhedron is the convex hull of finitely many points, not all on ...
having four triangular faces and four vertices. Once again, the four barycentric coordinates are defined so that the first vertex \mathbf_1 maps to barycentric coordinates \lambda = (1,0,0,0), \mathbf_2 \to (0,1,0,0), etc. This is again a linear transformation, and we may extend the above procedure for triangles to find the barycentric coordinates of a point \mathbf with respect to a tetrahedron: : \left(\begin\lambda_1 \\ \lambda_2 \\ \lambda_3\end\right) = \mathbf^ ( \mathbf-\mathbf_4 ) where \mathbf is now a 3×3 matrix: : \mathbf = \left(\begin x_1-x_4 & x_2-x_4 & x_3-x_4\\ y_1-y_4 & y_2-y_4 & y_3-y_4\\ z_1-z_4 & z_2-z_4 & z_3-z_4 \end\right) and \lambda_ = 1 - \lambda_ - \lambda_ - \lambda_with the corresponding Cartesian coordinates:\begin x = \lambda_ x_ + \lambda_ x_ + \lambda_3 x_ + (1-\lambda_1-\lambda_2-\lambda_3)x_4 \\ y = \lambda_ y_ + \lambda_ y_ + \lambda_3 y_ + (1-\lambda_1-\lambda_2-\lambda_3)y_4 \\ z=\lambda_ z_ + \lambda_ z_ + \lambda_3 z_ + (1-\lambda_1-\lambda_2-\lambda_3)z_4 \\ \endOnce 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 coordinates

Barycentric coordinates (\lambda_1, \lambda_2, ..., \lambda_k) of a point p \in \mathbb^n that are defined with respect to a finite set of ''k'' points x_1, x_2, ..., x_k \in \mathbb^n instead of a simplex are called generalized barycentric coordinates. For these, the equation :(\lambda_1 + \lambda_2 + \cdots + \lambda_k)p = \lambda_1 x_1 + \lambda_2 x_2 + \cdots + \lambda_k x_k is still required to hold. Usually one uses normalized coordinates, \lambda_1 + \lambda_2 + \cdots + \lambda_k = 1. As for the case of a simplex, the points with nonnegative normalized generalized coordinates (0 \le \lambda_i \le 1) form the convex hull of . If there are more points than in a full simplex (k > n + 1) the generalized barycentric coordinates of a point are ''not'' unique, as the defining linear system (here for n=2) \left(\begin 1 & 1 & 1 & ... \\ x_1 & x_2 & x_3 & ... \\ y_1 & y_2 & y_3 & ... \end\right) \begin \lambda_1 \\ \lambda_2 \\ \lambda_3 \\ \vdots \end = \left(\begin 1\\x\\y \end\right) is underdetermined. The simplest example is a
quadrilateral In geometry a quadrilateral is a four-sided polygon, having four edges (sides) and four corners (vertices). The word is derived from the Latin words ''quadri'', a variant of four, and ''latus'', meaning "side". It is also called a tetragon, ...
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 (n-1)-simplex, which has ''n'' vertices – the map is onto: \Delta^ \twoheadrightarrow P. 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 variable In an optimization problem, a slack variable is a variable that is added to an inequality constraint to transform it into an equality. Introducing a slack variable replaces an inequality constraint with an equality constraint and a non-negativity c ...
s, which measure by how much margin a point satisfies the linear constraints, and gives an
embedding In mathematics, an embedding (or imbedding) is one instance of some mathematical structure contained within another instance, such as a group that is a subgroup. When some object X is said to be embedded in another object Y, the embedding is g ...
P \hookrightarrow (\mathbf_)^f into the ''f''-
orthant In geometry, an orthant or hyperoctant is the analogue in ''n''-dimensional Euclidean space of a quadrant in the plane or an octant in three dimensions. In general an orthant in ''n''-dimensions can be considered the intersection of ''n'' mutua ...
, 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 (n-1)-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 K^n as the standard object for vector spaces, and the standard
affine hyperplane In geometry, a hyperplane is a subspace whose dimension is one less than that of its ''ambient space''. For example, if a space is 3-dimensional then its hyperplanes are the 2-dimensional planes, while if the space is 2-dimensional, its hyperp ...
\ \subset K^ as the standard object for affine spaces, where in each case choosing a
linear basis In mathematics, a set of vectors in a vector space is called a basis if every element of may be written in a unique way as a finite linear combination of elements of . The coefficients of this linear combination are referred to as components ...
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

Generalized barycentric coordinates have applications in
computer graphics Computer graphics deals with generating images with the aid of computers. Today, computer graphics is a core technology in digital photography, film, video games, cell phone and computer displays, and many specialized applications. A great de ...
and more specifically in
geometric model __NOTOC__ Geometric modeling is a branch of applied mathematics and computational geometry that studies methods and algorithms for the mathematical description of shapes. The shapes studied in geometric modeling are mostly two- or three-dimensio ...
ling. 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 Geophysics () is a subject of natural science concerned with the physical processes and physical properties of the Earth and its surrounding space environment, and the use of quantitative methods for their analysis. The term ''geophysics'' so ...
.ONUFRIEV, VG; DENISIK, SA; FERRONSKY, VI, BARICENTRIC MODELS IN ISOTOPE STUDIES OF NATURAL-WATERS. NUCLEAR GEOPHYSICS, 4, 111-117 (1990)


See also

*
Ternary plot A ternary plot, ternary graph, triangle plot, simplex plot, Gibbs triangle or de Finetti diagram is a barycentric plot on three variables which sum to a constant. It graphically depicts the ratios of the three variables as positions in an equ ...
*
Convex combination In convex geometry and vector algebra, a convex combination is a linear combination of points (which can be vectors, scalars, or more generally points in an affine space) where all coefficients are non-negative and sum to 1. In other w ...
* Water pouring puzzle *
Homogeneous coordinates In mathematics, homogeneous coordinates or projective coordinates, introduced by August Ferdinand Möbius in his 1827 work , are a system of coordinates used in projective geometry, just as Cartesian coordinates are used in Euclidean geometry. ...


References

*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. * *
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 * *
Barycentric coordinates computation in homogeneous coordinates
Vaclav Skala, Computers and Graphics, Vol.32, No.1, pp. 120–127, 2008


External links




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
an
TriangleCurve command
at
Geogebra GeoGebra (a portmanteau of ''geometry'' and ''algebra'') is an interactive geometry, algebra, statistics and calculus application, intended for learning and teaching mathematics and science from primary school to university level. GeoGebra is ...
. {{DEFAULTSORT:Barycentric Coordinate System Linear algebra Affine geometry Triangle geometry Coordinate systems Two-dimensional coordinate systems