Barycentric coordinates (mathematics)
Encyclopedia
In geometry
Geometry
Geometry arose as the field of knowledge dealing with spatial relationships. Geometry was one of the two fields of pre-modern mathematics, the other being the study of numbers ....

, the barycentric coordinate system is a coordinate system
Coordinate system
In geometry, a coordinate system is a system which uses one or more numbers, or coordinates, to uniquely determine the position of a point or other geometric element. The order of the coordinates is significant and they are sometimes identified by their position in an ordered tuple and sometimes by...

 in which the location of a point is specified as the center of mass
Center of mass
In physics, the center of mass or barycenter of a system is the average location of all of its mass. In the case of a rigid body, the position of the center of mass is fixed in relation to the body...

, or barycenter, of masses placed at the vertices
Vertex (geometry)
In geometry, a vertex is a special kind of point that describes the corners or intersections of geometric shapes.-Of an angle:...

 of a simplex
Simplex
In geometry, a simplex is a generalization of the notion of a triangle or tetrahedron to arbitrary dimension. Specifically, an n-simplex is an n-dimensional polytope which is the convex hull of its n + 1 vertices. For example, a 2-simplex is a triangle, a 3-simplex is a tetrahedron,...

 (a triangle, tetrahedron
Tetrahedron
In geometry, a tetrahedron is a polyhedron composed of four triangular faces, three of which meet at each vertex. A regular tetrahedron is one in which the four triangles are regular, or "equilateral", and is one of the Platonic solids...

, etc). Barycentric coordinates are a form of homogeneous coordinates
Homogeneous coordinates
In mathematics, homogeneous coordinates, introduced by August Ferdinand Möbius in his 1827 work Der barycentrische Calcül, are a system of coordinates used in projective geometry much as Cartesian coordinates are used in Euclidean geometry. They have the advantage that the coordinates of points,...

. The system was introduced (1827) by August Ferdinand Möbius
August Ferdinand Möbius
August Ferdinand Möbius was a German mathematician and theoretical astronomer.He is best known for his discovery of the Möbius strip, a non-orientable two-dimensional surface with only one side when embedded in three-dimensional Euclidean space. It was independently discovered by Johann Benedict...

.

Definition

Let be the vertices of a simplex
Simplex
In geometry, a simplex is a generalization of the notion of a triangle or tetrahedron to arbitrary dimension. Specifically, an n-simplex is an n-dimensional polytope which is the convex hull of its n + 1 vertices. For example, a 2-simplex is a triangle, a 3-simplex is a tetrahedron,...

 in a vector space
Vector space
A vector space is a mathematical structure formed by a collection of vectors: objects that may be added together and multiplied by numbers, called scalars in this context. Scalars are often taken to be real numbers, but one may also consider vector spaces with scalar multiplication by complex...

 A. If, for some point in A,


and at least one of does not vanish
then we say that the coefficients () are barycentric coordinates of with respect to . The vertices themselves have the coordinates . Barycentric coordinates are not unique: for any b not equal to zero, () are also barycentric coordinates of p.

When the coordinates are not negative, the point lies in the convex hull
Convex hull
In mathematics, the convex hull or convex envelope for a set of points X in a real vector space V is the minimal convex set containing X....

 of , that is, in the simplex which has those points as its vertices.

Barycentric coordinates on triangles

In the context of a triangle
Triangle
A triangle is one of the basic shapes of geometry: a polygon with three corners or vertices and three sides or edges which are line segments. A triangle with vertices A, B, and C is denoted ....

, barycentric coordinates are also known as areal coordinates, because the coordinates of P with respect to triangle ABC are proportional to the (signed) areas of PBC, PCA and PAB. Areal and trilinear coordinates
Trilinear coordinates
In geometry, the trilinear coordinates of a point relative to a given triangle describe the relative distances from the three sides of the triangle. Trilinear coordinates are an example of homogeneous 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
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....

 tables are often presented in terms of area coordinates.

First let us consider a triangle T defined by three vertices , and . Any point located on this triangle may then be written as a weighted sum of these three vertices, i.e.


where , and are the area coordinates (usually denoted as ). These are subjected to the constraint


which means that


Following this, the integral of a function on T is

Note that the above has the form of a linear interpolation. Indeed, area coordinates will also allow us to perform a linear interpolation
Linear interpolation
Linear interpolation is a method of curve fitting using linear polynomials. Lerp is an abbreviation for linear interpolation, which can also be used as a verb .-Linear interpolation between two known points:...

 at all points in the triangle if the values of the function are known at the vertices.

Converting to barycentric coordinates

Given a point inside a triangle it is also desirable to obtain the barycentric coordinates , and at this point. We can write the barycentric expansion of vector having Cartesian coordinates  in terms of the components of the triangle vertices (, , ) as


substituting into the above gives


Rearranging, this is


This linear transformation
Linear transformation
In mathematics, a linear map, linear mapping, linear transformation, or linear operator is a function between two vector spaces that preserves the operations of vector addition and scalar multiplication. As a result, it always maps straight lines to straight lines or 0...

 may be written more succinctly as


Where is the vector
Vector space
A vector space is a mathematical structure formed by a collection of vectors: objects that may be added together and multiplied by numbers, called scalars in this context. Scalars are often taken to be real numbers, but one may also consider vector spaces with scalar multiplication by complex...

 of barycentric coordinates, is the vector of Cartesian coordinates, and is a matrix
Matrix (mathematics)
In mathematics, a matrix is a rectangular array of numbers, symbols, or expressions. The individual items in a matrix are called its elements or entries. An example of a matrix with six elements isMatrices of the same size can be added or subtracted element by element...

 given by


Now the matrix is invertible, since and are linearly independent (if this were not the case, then , , and would be collinear
Line (geometry)
The notion of line or straight line was introduced by the ancient mathematicians to represent straight objects with negligible width and depth. Lines are an idealization of such objects...

 and would not form a triangle). Thus, we can rearrange the above equation to get


Finding the barycentric coordinates has thus been reduced to finding the inverse matrix of , an easy problem in the case of 2×2 matrices.

Explicitly, the formulae for the barycentric co-ordinates of are:

Determining if a point is inside a triangle

Since barycentric coordinates are a linear transformation
Linear transformation
In mathematics, a linear map, linear mapping, linear transformation, or linear operator is a function between two vector spaces that preserves the operations of vector addition and scalar multiplication. As a result, it always maps straight lines to straight lines or 0...

 of Cartesian coordinates, it follows that they vary linearly along the edges and over the area of the triangle. If a point lies in the interior of the triangle, all of the Barycentric coordinates lie in the open interval . If a point lies on an edge of the triangle, at least one of the area coordinates is zero, while the rest lie in the closed interval .

Summarizing,
Point lies inside the triangle if and only if
If and only if
In logic and related fields such as mathematics and philosophy, if and only if is a biconditional logical connective between statements....

 .
Otherwise, lies on the edge or corner of the triangle if .
Otherwise, lies outside the triangle.

Interpolation on a triangular unstructured grid

Barycentric coordinates provide a convenient way to interpolate a function on an unstructured grid
Unstructured grid
An unstructured 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...

 or mesh
Mesh
Mesh consists of semi-permeable barrier made of connected strands of metal, fiber, or other flexible/ductile material. Mesh is similar to web or net in that it has many attached or woven strands.-Types of mesh:...

, as long as the function's value is known at all vertices of the mesh.

To interpolate a function at a point , we go through each triangular element and transform into the barycentric coordinates of that triangle. If , then the point lies in the triangle or on its edge (explained in the previous section). Now, we interpolate the value of as


This linear interpolation is automatically normalized
Normalization
Normalization may refer to:- Mathematics and statistics:* Normalization property , term in mathematical logic and theoretical computer science* Noether normalization lemma, result of commutative algebra...

 since .

Barycentric coordinates on tetrahedra

Barycentric coordinates may be easily extended to three dimensions
Coordinate space
In mathematics, specifically in linear algebra, the coordinate space, Fn, is the prototypical example of an n-dimensional vector space over a field F. It can be defined as the product space of F over a finite index set.-Definition:...

. The 3D simplex
Simplex
In geometry, a simplex is a generalization of the notion of a triangle or tetrahedron to arbitrary dimension. Specifically, an n-simplex is an n-dimensional polytope which is the convex hull of its n + 1 vertices. For example, a 2-simplex is a triangle, a 3-simplex is a tetrahedron,...

 is a tetrahedron
Tetrahedron
In geometry, a tetrahedron is a polyhedron composed of four triangular faces, three of which meet at each vertex. A regular tetrahedron is one in which the four triangles are regular, or "equilateral", and is one of the Platonic solids...

, a polyhedron
Polyhedron
In elementary geometry a polyhedron is a geometric solid in three dimensions with flat faces and straight edges...

 having four triangular faces and four vertices. Once again, the barycentric coordinates are defined so that the first vertex maps to barycentric coordinates , , etc.

This is again a linear transformation, and we may extend the above procedure for triangles to find the barycentric coordinates of a point with respect to a tetrahedron:


where is now a 3×3 matrix:


Once again, the problem of finding the barycentric coordinates has been reduced to inverting a 3×3 matrix. 3D barycentric coordinates may be used to decide if a point lies inside a tetrahedral volume, and to interpolate a function within a tetrahedral mesh, in an analogous manner to the 2D procedure. Tetrahedral meshes are often used in finite element analysis because the use of barycentric coordinates can greatly simplify 3D interpolation.

Generalized barycentric coordinates

Barycentric coordinates (a1, ..., an) that are defined with respect to a polytope
Polytope
In elementary geometry, a polytope is a geometric object with flat sides, which exists in any general number of dimensions. A polygon is a polytope in two dimensions, a polyhedron in three dimensions, and so on in higher dimensions...

 instead of a simplex are called generalized barycentric coordinates. For these, the equation


is still required to hold where x1, ..., xn are the vertices of the given polytope. Thus, the definition is formally unchanged but while a simplex with n vertices needs to be embedded in a vector space of dimension of at least n-1, a polytope may be embedded in a vector space of lower dimension. The simplest example is a quadrilateral in the plane. Consequently, even normalized generalized barycentric coordinates (i.e. coordinates such that the sum of the coefficients is 1) are in general not uniquely determined anymore while this is the case for normalized barycentric coordinates with respect to a simplex.

More abstractly, generalized barycentric coordinates express a polytope with n vertices, regardless of dimension, as the image of the standard -simplex, which has n vertices – the map is onto: The map is one-to-one if and only if the polytope is a simplex, in which case the map is an isomorphism; this corresponds to a point not having unique generalized barycentric coordinates.

Dual to generalized barycentric coordinates are slack variable
Slack variable
In an optimization problem, a slack variable is a variable that is added to an inequality constraint to transform it to an equality. Introducing a slack variable replaces an inequality constraint with an equality constraint and a nonnegativity constraint....

s, which measure by how much margin a point satisfies the linear constraints, and gives an embedding
Embedding
In mathematics, an embedding is one instance of some mathematical structure contained within another instance, such as a group that is a subgroup....

  into the f-orthant
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....

, where f is the number of faces (dual to the vertices). This map is one-to-one (slack variables are uniquely determined) but not onto (not all combinations can be realized).

This use of the standard -simplex and f-orthant as standard objects that map to a polytope or that a polytope maps into should be contrasted with the use of the standard vector space as the standard object for vector spaces, and the standard affine hyperplane  as the standard object for affine spaces, where in each case choosing a linear basis or affine basis provides an isomorphism, allowing all vector spaces and affine spaces to be thought of in terms of these standard spaces, rather than an onto or one-to-one map (not every polytope is a simplex). Further, the n-orthant is the standard object that maps to cones.

Applications

Generalized barycentric coordinates have applications in computer graphics
Computer graphics
Computer graphics are graphics created using computers and, more generally, the representation and manipulation of image data by a computer with help from specialized software and hardware....

 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.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK