Caveat: I know little about geometry but as I learn I uncover unnoded material. I don't see why barycentric coordinates are important but I will present their definition and prove the coordinates are unique.

Theorem: Let A, B, and C be vectors defining three non-collinear points. Then any point D in the plane defined by the points can be uniquely written as aA + bB +cC, where a + b + c = 1. I will give a simple proof that I find elegant. It is taken from Dan Pedoe's book entitled Geometry.

Proof:

If D = A then the theorem is obvious. Assume D != A. Let D' be a point on the line that passes through B and C. Then it is easy to show (write D' = B + t(C-B)) that D' = kB + k'C where k + k' = 1. By the same idea, D = lA + l'D' where l + l' = 1. Then D = lA + l'kB + l'k'C. The sum of the coefficients is l + l'k + l'k' = l + l'(k+k') = l + l' = 1.

The question remains as to whether the coefficients are unique. Assume D = aA + bB + cC = a'A + b'B + c'C, where the sums of both pairs of coefficients is 1. Then (a-a')A + (b-b')B + (c-c')C = 0. The sum of the coefficients in this equation is 1 - 1 = 0. In general, if X, Y, and Z are three non-collinear points and xX + yY +zZ = 0 and x + y + z = 0, then x = y = z = 0. This fact deserves a proof in another writeup but I do not know how to name it. Anyway, that fact proves the uniqueness of the barycentric coordinates.

barycentric coordinates are also often referred to as area coordinates. They are extremely useful in mathematics and engineering, being used often for the evaluation of functions over triangles.

Consider a triangle defined by the three vertexes v1, v2 and v3. Any point r inside that triangle can be written in terms of barycentric coordinates β1, β2 and β3 as

r = β1 v1 + β2 v2 + β3 v3

where the barycentric coordinates are constrained by the relationship

β1 + β2 + β3 = 1

This operation represents a linear interpolation of the triangle's three vertex coordinates. Any point inside the triangle may be found through each unique combination of barycentric coordinates.

Consider now that you have a triangle as defined above, and some scalar function P defined only at each vertex, i.e. you've got P1, P2 and P3, and you wish to interpolate a value at some point r inside the triangle. You can use the formula above to obtain the interpolated value P(r) if you find the barycentric coordinates for point r.

We can use the relationships above to solve for β1, β2 and β3 in terms of vertex coordinates v1, v2, and v3. Define the components of each vector as

v1 = (x1, y1, z1)
v2 = (x2, y2, z2)
v3 = (x3, y3, z3)

Given a known point (x, y, z) inside the triangle, the barycentric expansion is

x = β1 x1 + β2 x2 + β3 x3
y = β1 y1 + β2 y2 + β3 y3
z = β1 z1 + β2 z2 + β3 z3

subject to the constraint

β1 + β2 + β3 = 1

This represents three equations in two unknowns, since

β3 = 1 - β1 - β2

so, making this substitution

x = β1 x1 + β2 x2 + (1 - β1 - β2) x3
y = β1 y1 + β2 y2 + (1 - β1 - β2) y3
z = β1 z1 + β2 z2 + (1 - β1 - β2) z3

Rearranging, this is

β1(x1 - x3) + β2(x2 - x3) + x3 - x = 0
β1(y1 - y3) + β2(y2 - y3) + y3 - y = 0
β1(z1 - z3) + β2(z2 - z3) + z3 - z = 0

Solving for β1 and β2 yields

β1 = (B*(F + I) - C*(E + H))/(A*(E + H) - B*(D + G))
β2 = (A*(F + I) - C*(D + G))/(B*(D + G) - A*(E + H))

where

A = x1 - x3
B = x2 - x3
C = x3 - x
D = y1 - y3
E = y2 - y3
F = y3 - y
G = z1 - z3
H = z2 - z3
I = z3 - z

and β3 is found from the other two.



If you find these relationships useful let me know.

Log in or register to write something here or to contact authors.