Wikipedia / Barycentric coordinate system
Wikipedia / Barycentric coordinate system
In geometry, a barycentric coordinate system is a coordinate system in which the location of a point is specified by reference to a simplex (a triangle for points in a plane, a tetrahedron for points in three-dimensional space, etc.). The barycentric coordinates of a point can be interpreted as point masses placed at the vertices of the simplex, such that the point is the center of mass (or barycenter) of these masses. These masses can be zero or negative; they are all positive if and only if the point is strictly inside the simplex.
Every point has barycentric coordinates, and their sum is never zero. Two tuples of barycentric coordinates specify the same point if and only if they are proportional; that is to say, if one tuple can be obtained by multiplying the elements of the other tuple by the same non-zero number. Therefore, barycentric coordinates are either considered to be defined up to multiplication by a nonzero constant, or normalized for summing to unity.
Barycentric coordinates were introduced by August Möbius in 1827. They are special homogeneous coordinates. Barycentric coordinates are strongly related with Cartesian coordinates and, more generally, to affine coordinates ().
Barycentric coordinates are particularly useful in triangle geometry for studying properties that do not depend on the angles of the triangle, such as Ceva's theorem, Routh's theorem, and Menelaus's theorem. In computer-aided design, they are useful for defining some kinds of Bézier surfaces.
Definition
be points in a Euclidean space, a flat or an affine space of dimension that are affinely independent; this means that there is no affine subspace of dimension that contains all the points, or, equivalently that the points define a simplex there are scalars for any point represents the translation vector or free vector that maps the point to the point .)
The elements of a that satisfies this equation are called barycentric coordinates of The use of colons in the notation of the tuple means that barycentric coordinates are a sort of homogeneous coordinates, that is, the point is not changed if all coordinates are multiplied by the same nonzero constant. Moreover, the barycentric coordinates are also not changed if the auxiliary point , the origin, is changed.
The barycentric coordinates of a point are unique up to a scaling are barycentric coordinates of the same point if and only if for every .
These specific barycentric coordinates are called normalized or absolute barycentric coordinates. Sometimes, they are also called affine coordinates, although this term refers commonly to a slightly different concept.
Sometimes, it is the normalized barycentric coordinates that are called barycentric coordinates. In this case the above defined coordinates are called homogeneous barycentric coordinates.
With above notation, the homogeneous barycentric coordinates of are all zero, except the one of index . When working over the real numbers (the above definition is also used for affine spaces over an arbitrary field), the points whose all normalized barycentric coordinates are nonnegative form the convex hull which is the simplex that has these points as its vertices.
is independent from the origin defines a direction of lines, that is a point at infinity. See below for more details.
Relationship with Cartesian or affine coordinates
Barycentric coordinates are strongly related to Cartesian coordinates and, more generally, affine coordinates. For a space of dimension , these coordinate systems are defined relative to a point , the origin, whose coordinates are zero, and whose coordinates are zero except that of index that equals one.
The main advantage of barycentric coordinate systems is to be symmetric with respect to the defining points. They are therefore often useful for studying properties that are symmetric with respect to points. On the other hand, distances and angles are difficult to express in general barycentric coordinate systems, and when they are involved, it is generally simpler to use a Cartesian coordinate system.
Relationship with projective coordinates
Homogeneous barycentric coordinates are also strongly related with some projective coordinates. However this relationship is more subtle than in the case of affine coordinates, and, for being clearly understood, requires a coordinate-free definition of the projective completion of an affine space, and a definition of a projective frame.
The projective completion of an affine space of dimension is a projective space of the same dimension that contains the affine space as the complement of a hyperplane. The projective completion is unique up to an isomorphism. The hyperplane is called the hyperplane at infinity, and its points are the points at infinity of the affine space.
Given a projective space of dimension , a projective frame is an ordered set of points that are not contained in the same hyperplane. A projective frame defines a projective coordinate system such that the coordinates of the th point of the frame are all equal, and, otherwise, all coordinates of the th point are zero, except the th one.
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, 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, barycentric coordinates are also known as area coordinates or areal coordinates, because the coordinates of with respect to triangle are equivalent to the (signed) ratios of the areas of , and to the area of the reference triangle . Areal and trilinear coordinates are used for similar purposes in geometry.
Barycentric or areal coordinates are extremely useful in engineering applications involving triangular subdomains. These make analytic integrals often easier to evaluate, and Gaussian quadrature tables are often presented in terms of area coordinates.
in the as vectors, so it makes sense to add or subtract them and multiply them by scalars.
has a signed area or sarea goes around the triangle in a counterclockwise direction. The sign is minus if the path goes around in a clockwise direction.
be its normalized barycentric coordinates
are also called areal coordinates
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.
, are parallel and congruent.
, so twice its signed area whose columns
Expanding the determinant, using its alternating and multilinear properties
Trilinear coordinates to the lines , , and lie on the same side of where, as above, sarea stands for signed area. All three signs are plus if triangle 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
from the Cartesian coordinates or vice versa.
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.
This linear transformation is the vector is the vector of Cartesian coordinates is a matrix
is invertible are linearly independent would be collinear
Finding the barycentric coordinates has thus been reduced to finding the 2×2 inverse matrix, an easy problem.
in terms of its Cartesian coordinates (x, y
Vertex approach
Another way to solve the conversion from Cartesian to barycentric coordinates is to write the relation in the matrix. The barycentric coordinates are thus the solution of the linear systemis 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 where , ,
Equations in barycentric coordinates
The three sides , , respectively have equations
The equation of a triangle's Euler line is
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
is
The distance between and where , ,
The barycentric coordinates of a point can be calculated based on distances
Applications
Determining location with respect to a triangle
. In fact, given any point in cartesian coordinates, we can use this fact to determine where this point is with respect to a triangle.
If a point lies in the interior of the triangle, all of the Barycentric coordinates lie in the open interval If 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,
lies inside the triangle if and only if.
.
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
are known quantities, but the values of is unknown, they can be approximated using linear interpolation
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 can be interpolated as described above.
These methods have many applications, such as the finite element method (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 where is the areawhere is the volume of the tetrahedron.
This approach can be generalized to higher dimensions, to integrate over any -dimensional simplex.
Examples of special points
hold.
Normalizing coordinates at vertices, the three vertices , , and have coordinates:
The centroid.
If , , are the edge lengths are the angle measures respectively, and is the semiperimeter hold in addition.
The circumcenter has coordinates
The orthocenter has coordinates
The incenter
The excenters have coordinates
The nine-point center has coordinates
The Gergonne point.
The Nagel point.
The symmedian point.
Barycentric coordinates on tetrahedra
Barycentric coordinates may be easily extended to three dimensions. The 3D simplex is a tetrahedron, a polyhedron, etc.
Once again, the problem of finding the barycentric coordinates has been reduced to inverting a 3×3 matrix.
3D barycentric coordinates may be used to decide if a point lies inside a tetrahedral volume, and to interpolate a function within a tetrahedral mesh, in an analogous manner to the 2D procedure. Tetrahedral meshes are often used in finite element analysis because the use of barycentric coordinates can greatly simplify 3D interpolation.
Generalized barycentric coordinates
that are defined with respect to a finite set of instead of a simplex are called generalized barycentric coordinates is still required to hold.. As for the case of a simplex, the points with nonnegative normalized generalized coordinates) form the convex hull of ) the generalized barycentric coordinates of a point are not unique, as the defining linear system (here for is underdetermined. The simplest example is a quadrilateral in the plane. Various kinds of additional restrictions can be used to define unique barycentric coordinates.
Abstraction
More abstractly, generalized barycentric coordinates express a convex polytope with vertices, regardless of dimension, as the image-simplex, which has 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 is a simplex.
Dual to generalized barycentric coordinates are slack variables, which measure by how much margin a point satisfies the linear constraints, and gives an embedding into the -orthant, where 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).
-simplex and as the standard object for vector spaces, and the standard affine hyperplane as the standard object for affine spaces, where in each case choosing a linear basis or affine basis provides an isomorphism, allowing all vector spaces and affine spaces to be thought of in terms of these standard spaces, rather than an onto or one-to-one map (not every polytope is a simplex). Further, the -orthant is the standard object that maps to cones.
Applications
Generalized barycentric coordinates have applications in computer graphics and more specifically in geometric modelling. Often, a three-dimensional model can be approximated by a polyhedron such that the generalized barycentric coordinates with respect to that polyhedron have a geometric meaning. In this way, the processing of the model can be simplified by using these meaningful coordinates. Barycentric coordinates are also used in geophysics.
See also
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
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
Barycentric Coordinates in Olympiad Geometry by Evan Chen and Max Schindler