In an affine space any point can be represented by a sum of an origin point plus a set
of scaled vector. This article covers defining all the points in a triangle in an affine space.
Published on Thu, Mar 10, 2016
Last modified on Sun, Jun 16, 2024
298 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 a affine combination in the form
We can add an additional restriction on the values of to define a triangle built out of three points, if , and 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 pass 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 of 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 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.