Barycentric coordinates (mathematics)
From Wikipedia, the free encyclopedia
In mathematics, barycentric coordinates are coordinates defined by the vertices of a simplex. Barycentric coordinates are a form of homogeneous coordinates.
Let x1, ..., xn be the vertices of a simplex in a vector space A. If, for some point p in A,
then we say that the coefficients (a1, ..., an) are barycentric coordinates of p with respect to x1, ..., xn. The vertices themselves have the coordinates (1, 0, 0, ..., 0), (0, 1, 0, ..., 0), ..., (0, 0, 0, ..., 1). Barycentric coordinates are not unique: for any b not equal to zero, (b a1, ..., b an) are also barycentric coordinates of p.
When the coordinates are not negative, the point p lies in the convex hull of x1, ..., xn, that is, in the simplex which has those points as its vertices.
If we imagine masses equal to a1, ..., an attached to the vertices of the simplex, the center of mass (the barycenter) is then p. This is the origin of the term "barycentric", introduced (1827) by August Ferdinand Möbius.
See also ternary plot.
[edit] Barycentric coordinates on triangles
Barycentric or area 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.
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. 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 at all points in the triangle if the values of the function are known at the vertices.
Given a point inside a triangle it is also desirable to obtain the area coordinates , and at this point. We can write the barycentric expansion of vector in terms of the components of the triangle vertices as
substituting into the above gives
Rearranging, this is
solving for and gives us
and
where
Note that this formulation breaks down when A and B are equal to 0, which is an indication that the triangle is perpendicular to the x axis. In those cases, simply switch A with D, B with E, C with F, and the equations for λ1 and λ2 will still work.
[edit] External links
- Barycentric coordinates: A Curious Application (solving the "three glasses" problem) at cut-the-knot
- Barycentric Coordinates at Mathworld