get a point on a line — live canvas animation example

motion & easing8+
trig, angles & vectors8+
collision detection11+
numbers in motion7+
geometry & shapes8-
generative showpieces13+
handy helpers7+
0 = A · 1 = B · outside [0,1] extrapolates

Drag endpoints A and B, and the t slider. It's just lerp on each axis:

x = 333 + (613 − 333) · 0.50 = 473
y = 382 + (202 − 382) · 0.50 = 292