HOME

TheInfoList



OR:

In
geometry Geometry (; ) is a branch of mathematics concerned with properties of space such as the distance, shape, size, and relative position of figures. Geometry is, along with arithmetic, one of the oldest branches of mathematics. A mathematician w ...
, a barycentric coordinate system is a
coordinate system In geometry, a coordinate system is a system that uses one or more numbers, or coordinates, to uniquely determine and standardize the position of the points or other geometric elements on a manifold such as Euclidean space. The coordinates are ...
in which the location of a point is specified by reference to a simplex (a
triangle A triangle is a polygon with three corners and three sides, one of the basic shapes in geometry. The corners, also called ''vertices'', are zero-dimensional points while the sides connecting them, also called ''edges'', are one-dimension ...
for points in a plane, a
tetrahedron In geometry, a tetrahedron (: tetrahedra or tetrahedrons), also known as a triangular pyramid, is a polyhedron composed of four triangular Face (geometry), faces, six straight Edge (geometry), edges, and four vertex (geometry), vertices. The tet ...
for points in
three-dimensional space In geometry, a three-dimensional space (3D space, 3-space or, rarely, tri-dimensional space) is a mathematical space in which three values ('' coordinates'') are required to determine the position of a point. Most commonly, it is the three- ...
, etc.). The barycentric coordinates of a point can be interpreted as
mass Mass is an Intrinsic and extrinsic properties, intrinsic property of a physical body, body. It was traditionally believed to be related to the physical quantity, quantity of matter in a body, until the discovery of the atom and particle physi ...
es placed at the vertices of the simplex, such that the point is the
center of mass In physics, the center of mass of a distribution of mass in space (sometimes referred to as the barycenter or balance point) is the unique point at any given time where the weight function, weighted relative position (vector), position of the d ...
(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 never zero. Two
tuple In mathematics, a tuple is a finite sequence or ''ordered list'' of numbers or, more generally, mathematical objects, which are called the ''elements'' of the tuple. An -tuple is a tuple of elements, where is a non-negative integer. There is o ...
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 Two Mathematical object, mathematical objects and are called "equal up to an equivalence relation " * if and are related by , that is, * if holds, that is, * if the equivalence classes of and with respect to are equal. This figure of speech ...
multiplication by a nonzero constant, or normalized for summing to unity. Barycentric coordinates were introduced by August Möbius 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 homogeneous coordinates. Barycentric coordinates are strongly related with
Cartesian coordinates In geometry, a Cartesian coordinate system (, ) in a plane is a coordinate system that specifies each point uniquely by a pair of real numbers called ''coordinates'', which are the signed distances to the point from two fixed perpendicular o ...
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 Computer-aided design (CAD) is the use of computers (or ) to aid in the creation, modification, analysis, or optimization of a design. This software is used to increase the productivity of the designer, improve the quality of design, improve c ...
, they are useful for defining some kinds of Bézier surfaces.


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, in Euclid's ''Elements'', it was the three-dimensional space of Euclidean geometry, but in modern mathematics there are ''Euclidean spaces ...
, 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 relat ...
\mathbf A of dimension that are affinely independent; this means that there is no
affine subspace In mathematics, an affine space is a geometry, geometric structure (mathematics), structure that generalizes some of the properties of Euclidean spaces in such a way that these are independent of the concepts of distance (mathematics), distance ...
of dimension that contains all the points,Reventós Tarrida, Agustí. "Affine Maps, Euclidean Motions and Quadrics". Springer, 2011, , page 11 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 ) \overset\overrightarrow = a_0 \overset\overrightarrow + \cdots + a_n \overset\overrightarrow , for any point . (As usual, the notation \overset\overrightarrow represents the translation vector or free vector 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, 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 Two Mathematical object, mathematical objects and are called "equal up to an equivalence relation " * if and are related by , that is, * if holds, that is, * if the equivalence classes of and with respect to are equal. This figure of speech ...
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" (often shortened as "iff") is paraphrased by the biconditional, a logical connective between statements. The biconditional is true in two cases, where either bo ...
there is a nonzero scalar \lambda such that b_i=\lambda a_i 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 \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, 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 duration or temperature. Here, ''continuous'' means that pairs of values can have arbitrarily small differences. Every re ...
s (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 In geometry, the convex hull, convex envelope or convex closure of a shape is the smallest convex set that contains it. The convex hull may be defined either as the intersection of all convex sets containing a given subset of a Euclidean space, ...
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 \overset\overrightarrow + \cdots + a_n \overset\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 In geometry, a Cartesian coordinate system (, ) in a plane is a coordinate system that specifies each point uniquely by a pair of real numbers called ''coordinates'', which are the signed distances to the point from two fixed perpendicular o ...
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 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 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. T ...
. 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 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 relat ...
, 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 In geometry, a hyperplane is a generalization of a two-dimensional plane in three-dimensional space to mathematical spaces of arbitrary dimension. Like a plane in space, a hyperplane is a flat hypersurface, a subspace whose dimension is ...
. The projective completion is unique
up to Two Mathematical object, mathematical objects and are called "equal up to an equivalence relation " * if and are related by , that is, * if holds, that is, * if the equivalence classes of and with respect to are equal. This figure of speech ...
an
isomorphism In mathematics, an isomorphism is a structure-preserving mapping or morphism 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 the ...
. 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. When constructing the projective completion from an affine coordinate system, one commonly defines it with respect to a projective frame consisting of the intersections with the hyperplane at infinity of the coordinate axes, 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 figure. The same definition extends to any object in n-d ...
, 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 corners and three sides, one of the basic shapes in geometry. The corners, also called ''vertices'', are zero-dimensional points while the sides connecting them, also called ''edges'', are one-dimension ...
, 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 In mathematics, an integral is the continuous analog of a sum, which is used to calculate areas, volumes, and their generalizations. Integration, the process of computing an integral, is one of the two fundamental operations of calculus,Int ...
often easier to evaluate, and
Gaussian quadrature In numerical analysis, an -point Gaussian quadrature rule, named after Carl Friedrich Gauss, is a quadrature rule constructed to yield an exact result for polynomials of degree or less by a suitable choice of the nodes and weights for . Th ...
tables are often presented in terms of area coordinates. Consider a triangle ABC with vertices A=(a_1,a_2), B=(b_1,b_2), C=(c_1,c_2) in the x,y-plane, \mathbb^2. One may regard points in \mathbb^2 as vectors, so it makes sense to add or subtract them and multiply them by scalars. Each triangle ABC has a ''signed area'' or ''sarea'', which is plus or minus its area: \operatorname(ABC) = \pm \operatorname(ABC). The sign is plus if the path from A to B to C then back to A goes around the triangle in a counterclockwise direction. The sign is minus if the path goes around in a clockwise direction. Let P be a point in the plane, and let (\lambda_1,\lambda_2,\lambda_3) be its ''normalized barycentric coordinates'' with respect to the triangle ABC, so P = \lambda_1 A + \lambda_2 B + \lambda_3 C and 1 = \lambda_1 + \lambda_2 + \lambda_3. Normalized barycentric coordinates (\lambda_1,\lambda_2,\lambda_3) are also called ''areal coordinates'' because they represent ratios of signed areas of triangles: \begin\lambda_1 &= \operatorname(PBC)/\operatorname(ABC)\\ \lambda_2 &= \operatorname(APC)/\operatorname(ABC)\\ \lambda_3 &= \operatorname(ABP)/\operatorname(ABC).\end One may prove these ratio formulas based on the facts that a triangle is half of a parallelogram, and the area of a parallelogram is easy to compute using a
determinant In mathematics, the determinant is a Scalar (mathematics), scalar-valued function (mathematics), function of the entries of a square matrix. The determinant of a matrix is commonly denoted , , or . Its value characterizes some properties of the ...
. Specifically, let D = -A+B+C. ABCD is a parallelogram because its pairs of opposite sides, represented by the pairs of displacement vectors D-C=B-A, and D-B=C-A, are parallel and congruent. Triangle ABC is half of the parallelogram ABDC, so twice its signed area is equal to the signed area of the parallelogram, which is given by the 2\times 2 determinant \det(B-A,C-A) whose ''columns'' are the displacement vectors B-A and C-A: \operatorname(ABCD)=\det\beginb_1-a_1 & c_1-a_1 \\ b_2-a_2 & c_2-a_2\end Expanding the determinant, using its ''alternating'' and ''multilinear'' properties, one obtains \begin\det(B-A,C-A) &= \det(B,C)-\det(A,C)-\det(B,A)+\det(A,A) \\ &= \det(A,B)+\det(B,C)+\det(C,A) \end so 2 \operatorname(ABC) = \det(A,B)+\det(B,C)+\det(C,A). Similarly, 2 \operatorname(PBC) = \det(P,B)+\det(B,C)+\det(C,P) , To obtain the ratio of these signed areas, express P in the second formula in terms of its barycentric coordinates: \begin2 \operatorname(PBC) &= \det(\lambda_1 A + \lambda_2 B + \lambda_3 C, B) + \det(B,C) + \det(C,\lambda_1 A + \lambda_2 B + \lambda_3 C)\\ &= \lambda_1 \det(A,B) + \lambda_3 \det(C,B) + \det(B,C) + \lambda_1 \det(C,A) + \lambda_2 \det(C,B)\\ &= \lambda_1 \det(A,B) + \lambda_1 \det(C,A) + (1-\lambda_2 - \lambda_3) \det(B,C) \end. The barycentric coordinates are normalized so 1 = \lambda_1 + \lambda_2 + \lambda_3, hence \lambda_1 = (1-\lambda_2 - \lambda_3) . Plug that into the previous line to obtain \begin2 \operatorname(PBC) &= \lambda_1 (\det(A,B)+\det(B,C)+\det(C,A)) \\ &= (\lambda_1)(2 \operatorname(ABC)).\end Therefore \lambda_1 = \operatorname(PBC)/\operatorname(ABC). Similar calculations prove the other two formulas \lambda_2 = \operatorname(APC)/\operatorname(ABC) \lambda_3 = \operatorname(ABP)/\operatorname(ABC). Trilinear coordinates (\gamma_1,\gamma_2,\gamma_3) of P are signed distances from P to the lines BC, AC, and AB, respectively. The sign of \gamma_1 is positive if P and A lie on the same side of BC, negative otherwise. The signs of \gamma_2 and \gamma_3 are assigned similarly. Let a = \operatorname(BC), b = \operatorname(CA), c = \operatorname(AB). Then \begin\gamma_1 a &= \pm 2\operatorname(PBC)\\ \gamma_2 b &= \pm 2\operatorname(APC)\\ \gamma_3 c &= \pm 2\operatorname(ABP)\end where, as above, sarea stands for signed area. All three signs are plus if triangle ABC is positively oriented, minus otherwise. The relations between trilinear and barycentric coordinates are obtained by substituting these formulas into the above formulas that express barycentric coordinates as ratios of areas. 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_1, \lambda_2 and \lambda_3 from the
Cartesian coordinates In geometry, a Cartesian coordinate system (, ) in a plane is a coordinate system that specifies each point uniquely by a pair of real numbers called ''coordinates'', which are the signed distances to the point from two fixed perpendicular o ...
(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_1 x_1 + \lambda_2 x_2 + \lambda_3 x_3 \\ pt y &= \lambda_1 y_1 + \lambda_2 y_2 + \lambda_3 y_3 \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_3 = 1 - \lambda_1 - \lambda_2 into the above to obtain \begin x &= \lambda_1 x_1 + \lambda_2 x_2 + (1 - \lambda_1 - \lambda_2) x_3 \\ pt y &= \lambda_1 y_1 + \lambda_2 y_2 + (1 - \lambda_1 - \lambda_2) y_3 \end Rearranging, this is \begin \lambda_1(x_1 - x_3) + \lambda_2(x_2 - x_3) + x_3 - x &= 0 \\ pt \lambda_1(y_1 - y_3) + \lambda_2(y_2 -\, y_3) + y_3 - \, 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 pr ...
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 * Disease vector, an agent that carries and transmits an infectious pathogen into another living organism Vector may also refer to: Mathematics a ...
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 * Disease vector, an agent that carries and transmits an infectious pathogen into another living organism Vector may also refer to: Mathematics a ...
of
Cartesian coordinates In geometry, a Cartesian coordinate system (, ) in a plane is a coordinate system that specifies each point uniquely by a pair of real numbers called ''coordinates'', which are the signed distances to the point from two fixed perpendicular o ...
, and \mathbf is a
matrix Matrix (: matrices or matrixes) or MATRIX may refer to: Science and mathematics * Matrix (mathematics), a rectangular array of numbers, symbols or expressions * Matrix (logic), part of a formula in prenex normal form * Matrix (biology), the m ...
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 ...
, 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 exists no nontrivial linear combination of the vectors that equals the zero vector. If such a linear combination exists, then the vectors are said to be . These concep ...
(if this were not the case, then \mathbf_1, \mathbf_2, and \mathbf_3 would be
collinear In geometry, collinearity of a set of Point (geometry), points is the property of their lying on a single Line (geometry), line. A set of points with this property is said to be collinear (sometimes spelled as colinear). In greater generality, t ...
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: \begin \lambda_1 =&\ \frac \\ pt &= \frac \\ pt&= \frac \\ 2pt \lambda_2 =&\ \frac \\ pt &= \frac \\ pt&= \frac \\ 2pt \lambda_3 =&\ 1 - \lambda_1 - \lambda_2 \\ pt&= 1-\frac \\ pt&= \frac \endWhen understanding the last line of equation, note the identity (\mathbf-\mathbf)\times(\mathbf-\mathbf)=(\mathbf-\mathbf)\times(\mathbf-\mathbf).


Vertex approach

Another way to solve the conversion from Cartesian to barycentric coordinates is to write the relation in the
matrix Matrix (: matrices or matrixes) or MATRIX may refer to: Science and mathematics * Matrix (mathematics), a rectangular array of numbers, symbols or expressions * Matrix (logic), part of a formula in prenex normal form * Matrix (biology), the m ...
form \mathbf \boldsymbol = \mathbfwith \mathbf = \left(\, \mathbf_1 \,, \, \mathbf_2 \,, \, \mathbf_3 \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 \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 ''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 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 \overset\overrightarrow=(p_1-q_1,p_2-q_2,p_3-q_3). The distance between and , or the length of the displacement vector \overset\overrightarrow=(x,y,z), is \begin d^2 &= , PQ, ^2 \\ pt &= -a^2yz - b^2zx - c^2xy \\ pt &= \frac \left ^2(b^2+c^2-a^2) + y^2(c^2+a^2-b^2) + z^2(a^2+b^2-c^2)\right \end 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 \begin x+y+z &= (p_1-q_1) + (p_2-q_2) + (p_3-q_3) \\ pt &= (p_1+p_2+p_3) - (q_1+q_2+q_3) \\ pt &= 1 - 1 = 0. \end 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 In mathematics, a real interval is the set (mathematics), set of all real numbers lying between two fixed endpoints with no "gaps". Each endpoint is either a real number or positive or negative infinity, indicating the interval extends without ...
(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" (often shortened as "iff") is paraphrased by the biconditional, a logical connective between statements. The biconditional is true in two cases, where either bo ...
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 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 po ...
. Barycentric coordinates provide a convenient way to compute this interpolation. If \mathbf is a point inside the triangle with barycentric coordinates \lambda_1, \lambda_2, \lambda_3, 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 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 \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 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 tran ...
(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 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_1 \mathbf_1 + \lambda_2 \mathbf_2 + (1 - \lambda_1 - \lambda_2) \mathbf_3) \ d\lambda_1 \ d\lambda_2 where is the
area Area is the measure of a region's size on a 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 open surface or the boundary of a three-di ...
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_1\mathbf_1 + \lambda_2\mathbf_2 + \lambda_3\mathbf_3 + (1-\lambda_1-\lambda_2-\lambda_3)\mathbf_4) \ d\lambda_1 \ d\lambda_2 \ d\lambda_3 where is the volume of the tetrahedron.


Examples of special points

In the homogeneous barycentric coordinate system defined with respect to a triangle ABC, the following statements about special points of ABC hold. The three vertices , , and have coordinatesScott, J. A. "Some examples of the use of areal coordinates in triangle geometry", '' Mathematical Gazette'' 83, November 1999, 472–477. \begin A = & 1 &:& 0 &:& 0 \\ B = & 0 &:& 1 &:& 0 \\ C = & 0 &:& 0 &:& 1 \end 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 figure. The same definition extends to any object in n-d ...
has coordinates 1:1:1. If , , are the edge lengths BC, CA, AB respectively, \alpha, \beta, \gamma are the angle measures \angle CAB, \angle ABC, and \angle BCA respectively, and is the semiperimeter of ABC, then the following statements about special points of ABC hold in addition. The circumcenter has coordinatesClark Kimberling's Encyclopedia of Triangles Wolfram page on barycentric coordinates
/ref> \begin & \sin 2\alpha &:& \sin 2\beta &:& \sin 2\gamma \\ pt =& 1-\cot\beta\cot\gamma &:& 1-\cot\gamma\cot\alpha &:& 1-\cot\alpha\cot\beta \\ pt =& 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 The orthocenter has coordinates \begin & \tan\alpha &:& \tan\beta &:& \tan\gamma \\ pt =& a\cos\beta\cos\gamma &:& b\cos\gamma\cos\alpha &:& c\cos\alpha\cos\beta \\ pt =& (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) \end The incenter has coordinates a:b:c=\sin \alpha:\sin \beta:\sin \gamma.Dasari Naga, Vijay Krishna, "On the Feuerbach triangle", ''Forum Geometricorum'' 17 (2017), 289–300: p. 289. http://forumgeom.fau.edu/FG2017volume17/FG201731.pdf The excenters have coordinates \begin J_A = & -a &:& b &:& c \\ J_B = & a &:& -b &:& c \\ J_C = & a &:& b &:& -c \end The nine-point center has coordinates \begin & a\cos(\beta-\gamma) &:& b\cos(\gamma-\alpha) &:& c\cos(\alpha-\beta) \\ pt =& 1+\cot\beta\cot\gamma &:& 1+\cot\gamma\cot\alpha &:& 1+\cot\alpha\cot\beta \\ pt =& a^2(b^2+c^2) - (b^2-c^2)^2 &:& b^2(c^2+a^2) - (c^2-a^2)^2 &:& c^2(a^2+b^2) - (a^2-b^2)^2 \end The Gergonne point has coordinates (s-b)(s-c):(s-c)(s-a):(s-a)(s-b). The Nagel point has coordinates s-a:s-b:s-c. The symmedian point has coordinates a^2:b^2:c^2.


Barycentric coordinates on tetrahedra

Barycentric coordinates may be easily extended to three dimensions. The 3D simplex is a
tetrahedron In geometry, a tetrahedron (: tetrahedra or tetrahedrons), also known as a triangular pyramid, is a polyhedron composed of four triangular Face (geometry), faces, six straight Edge (geometry), edges, and four vertex (geometry), vertices. The tet ...
, a
polyhedron In geometry, a polyhedron (: polyhedra or polyhedrons; ) is a three-dimensional figure with flat polygonal Face (geometry), faces, straight Edge (geometry), edges and sharp corners or Vertex (geometry), vertices. The term "polyhedron" may refer ...
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_4 = 1 - \lambda_1 - \lambda_2 - \lambda_3with the corresponding Cartesian coordinates:\begin x &= \lambda_1 x_1 + \lambda_2 x_2 + \lambda_3 x_3 + (1-\lambda_1-\lambda_2-\lambda_3)x_4 \\ y &= \lambda_1 y_1 + \,\lambda_2 y_2 + \lambda_3 y_3 + (1-\lambda_1-\lambda_2-\lambda_3)y_4 \\ z &= \lambda_1 z_1 + \,\lambda_2 z_2 + \lambda_3 z_3 + (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 Finite element method (FEM) is a popular method for numerically solving differential equations arising in engineering and mathematical models, mathematical modeling. Typical problem areas of interest include the traditional fields of structural ...
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 In geometry, the convex hull, convex envelope or convex closure of a shape is the smallest convex set that contains it. The convex hull may be defined either as the intersection of all convex sets containing a given subset of a Euclidean space, ...
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 Euclidean geometry, geometry a quadrilateral is a four-sided polygon, having four Edge (geometry), edges (sides) and four Vertex (geometry), corners (vertices). The word is derived from the Latin words ''quadri'', a variant of four, and ''l ...
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 variables, 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 (mathematics), group that is a subgroup. When some object X is said to be embedded in another object Y ...
P \hookrightarrow (\mathbf_)^f 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 (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 \ \subset K^ 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

Generalized barycentric coordinates have applications in
computer graphics Computer graphics deals with generating images and art with the aid of computers. Computer graphics is a core technology in digital photography, film, video games, digital art, cell phone and computer displays, and many specialized applications. ...
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 Geophysics () is a subject of natural science concerned with the physical processes and Physical property, properties of Earth and its surrounding space environment, and the use of quantitative methods for their analysis. Geophysicists conduct i ...
.ONUFRIEV, VG; DENISIK, SA; FERRONSKY, VI, BARICENTRIC MODELS IN ISOTOPE STUDIES OF NATURAL-WATERS. NUCLEAR GEOPHYSICS, 4, 111-117 (1990)


See also

* Ternary plot * Convex combination * Water pouring puzzle * Homogeneous coordinates


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 Alexander Bogomolny (January 4, 1948 July 7, 2018) was a Soviet Union, Soviet-born Israeli Americans, Israeli-American mathematician. He was Professor Emeritus of Mathematics at the University of Iowa, and formerly research fellow at the Moscow ...

Accurate point in triangle test

Barycentric Coordinates in Olympiad Geometry
by Evan Chen and Max Schindler
Barycenter command
an
TriangleCurve command
at Geogebra. {{DEFAULTSORT:Barycentric Coordinate System Linear algebra Affine geometry Triangle geometry Coordinate systems Two-dimensional coordinate systems