Barycentric coordinates (mathematics)

From Wikipedia, the free encyclopedia

(Redirected from Affine coordinates)
Jump to: navigation, search

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,

 (a_1 + \cdots + a_n)\, p = a_1 \, x_1 + \cdots + a_n \, x_n

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.

Barycentric coordinates (λ1,λ2,λ3) on an equilateral triangle.
Barycentric coordinates 123) on an equilateral triangle.

In the context of a triangle, 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 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.

First let us consider a triangle T defined by three vertices \textbf{v}_{1}\,, \textbf{v}_{2}\, and \textbf{v}_{3}\,. Any point \textbf{r} located on this triangle may then be written as a weighted sum of these three vertices, i.e.

\textbf{r} = \lambda_{1} \textbf{v}_{1} + \lambda_{2} \textbf{v}_{2} + \lambda_{3} \textbf{v}_{3},

where \lambda_{1}\,, \lambda_{2}\, and \lambda_{3}\, are the area coordinates. These are subjected to the constraint

\lambda_{1} + \lambda_{2} + \lambda_{3} = 1\,

which means that

\lambda_{3} = 1 - \lambda_{1} - \lambda_{2}\,

Following this, the integral of a function f(\textbf{r}) on T is


\int_{T} f(\textbf{r}) \ ds = 2A \int_{0}^{1} \int_{0}^{1 - \lambda_{2}} f(\lambda_{1} \textbf{v}_{1} + \lambda_{2} \textbf{v}_{2} +
(1 - \lambda_{1} - \lambda_{2}) \textbf{v}_{3}) \ d\lambda_{1} \ d\lambda_{2}
\,

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 \textbf{r}\, inside a triangle it is also desirable to obtain the area coordinates \lambda_{1}\,, \lambda_{2}\, and \lambda_{3}\, at this point. We can write the barycentric expansion of vector \textbf{r} = (x, y, z)\, in terms of the components of the triangle vertices as


\begin{matrix}
x = \lambda_{1} x_{1} +  \lambda_{2} x_{2} +  \lambda_{3} x_{3} \\
y = \lambda_{1} y_{1} +  \lambda_{2} y_{2} +  \lambda_{3} y_{3} \\
z = \lambda_{1} z_{1} +  \lambda_{2} z_{2} +  \lambda_{3} z_{3}
\end{matrix}
\,

substituting \lambda_{3} = 1 - \lambda_{1} - \lambda_{2}\, into the above gives


\begin{matrix}
x = \lambda_{1} x_{1} +  \lambda_{2} x_{2} + (1 - \lambda_{1} - \lambda_{2}) x_{3} \\
y = \lambda_{1} y_{1} +  \lambda_{2} y_{2} + (1 - \lambda_{1} - \lambda_{2}) y_{3} \\
z = \lambda_{1} z_{1} +  \lambda_{2} z_{2} + (1 - \lambda_{1} - \lambda_{2}) z_{3}
\end{matrix}
\,

Rearranging, this is


\begin{matrix}
\lambda_{1}(x_{1} - x_{3}) + \lambda_{2}(x_{2} - x_{3}) + x_{3} - x = 0 \\
\lambda_{1}(y_{1} - y_{3}) + \lambda_{2}(y_{2} - y_{3}) + y_{3} - y = 0 \\
\lambda_{1}(z_{1} - z_{3}) + \lambda_{2}(z_{2} - z_{3}) + z_{3} - z = 0
\end{matrix}
\,

solving for \lambda_{1}\, and \lambda_{2}\, gives us


\lambda_{1} = \frac{B(F + I) - C(E + H)}{A(E + H) - B(D + G)}
\,

and


\lambda_{2} = \frac{A(F + I) - C(D + G)}{B(D + G) - A(E + H)}
\,

where


\begin{matrix}
A = x_{1} - x_{3} \\
B = x_{2} - x_{3} \\
C = x_{3} - x \\
D = y_{1} - y_{3} \\
E = y_{2} - y_{3} \\
F = y_{3} - y \\
G = z_{1} - z_{3} \\
H = z_{2} - z_{3} \\
I = z_{3} - z \\
\end{matrix}
\,

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.

Advanced Search
Included Web Search Engines


Safe Search

close

Top Matching Results

Occasionally Search.com will highlight specialized results that are based on the context of your query. Examples of specialized results include specific links to news, images, or video.

Top Matching Results may highlight information from other Search.com pages, content from the CNET Network of sites, or third party content. The listings are based purely on relevance. Search.com does not receive payment for listings in this section but our partners that provide this data may get paid for listing these products.

Sponsored Links

This section contains paid listings which have been purchased by companies that want to have their sites appear for specific search terms and related content. These listings are administered, sorted and maintained by a third party and are not endorsed by Search.com.

Search Results

Search.com sends your search query to several search engines at one time and integrates the results into one list which has been sorted by relevance using Search.com's proprietary algorithm. You can customize the list of search engines included in your metasearch from the preferences.

The search engines that are used in your metasearch may allow companies to pay to have their Web sites included within the results. To view the Paid Inclusion policy for a specific search engine, please visit their Web site. Search.com does not accept payment or share revenue with any search engine partner for listings in this section.