In an affine space, any point can be represented by the sum of an origin point plus a set
of scaled vectors. This article covers defining all the points in a triangle within an affine space.
Published on Thu, Mar 10, 2016
Last modified on Sun, Sep 7, 2025
299 words -
Page Source
In an
affine space
, there’s the concept of affine combination, which states that any point in space can be represented as an affine combination in the form
We can add an additional restriction on the values of to define a triangle built from three points. If , , and Math input error, then a triangle is defined as the affine combination
barycentric coordinates
One geometric property of the scalar values is that they’re the signed scaled distance from the lines that pass through the triangle sides. To compute the scalar values and , we can use the fact that when the implicit equation of the line that passes through a side is evaluated with points that don’t lie on the line, the result is equal to
beta
Where is the distance from the point to the line. and are the coefficients of and in the general equation of the line that passes through and .
To find the value of , we can use the value of the implicit equation of the line to map the distance between any point to the line in the range . We can then use a simple division to find the value of .
In a similar fashion the value of is
References
Shirley, P. and Ashikhmin, M. (2005). Fundamentals of computer graphics. Wellesley, Mass.: AK Peters.