2 ms·
It’s simpler if you use 0 and 1 instead of a and b. If we want a linear function such that f(0) = A, f(1) = B, then the unique solution is f(t) = (1-t)A + tB
by jacobolus 7y ago
It’s simpler if you use 0 and 1 instead of a and b. If we want a linear function such that
f(0) = A, f(1) = B,
then the unique solution is
f(t) = (1-t)A + tB
The more general version with a and b is just composing this with a transformation of [a, b] into [0, 1]
Relevant keywords: linear interpolation, affine combination, barycentric coordinates.