Declaration ​
pascal
TBarycentricGradientSampler = class(TCustomSparsePointGradientSampler)Description ​
A sparse point gradient interpolator using a barycentric coordinate system for interpolation.
Based on three (and only three) vertices, with each vertex specified with a certain color, a linear triangle of color is calculated. Outside this triangle the colours extends as before.
Mathematics & Algorithm ​
Given a triangle with vertices
The weights
The interpolated color