Every geometric transform is a matrix. Drag a handle, and you're editing that matrix live — the whole image follows instantly. Affine can only ever produce parallelograms; perspective can turn any quadrilateral into any other, which is exactly why document scanners need it.
Drag any of the 3 cyan handles. Three points always uniquely define one affine transform — no more, no fewer.
a, b, c, d, tx, ty. Three point correspondences give exactly 6 equations — a unique solution, no more freedom left. Always maps a triangle to a triangle, a parallelogram to a parallelogram.
The extra 2 degrees of freedom (in the bottom row of the 3×3 matrix) are exactly what let a quadrilateral map to any other quadrilateral — including turning a trapezoid into a true rectangle.
Both playgrounds compute the inverse transform and, for every output pixel, ask "where did this come from in the source?" — sampled with bilinear interpolation. Forward-warping each source pixel individually would leave gaps.
You photograph a rectangular sheet of paper at a steep angle, so in the photo it looks like a trapezoid (narrower at the top). You want to digitally "flatten" it back into a true rectangle. Which transform actually works?