Bézier curves

A cubic Bézier curve is the curve in every drawing program: four control points, of which it passes through only the first and the last. De Casteljau's construction draws it with nothing but mixing. Mix each pair of neighboring control points t of the way along, then mix the three points that gives, then the two after that. The last point lands on the curve, and as t runs from 0 to 1, it traces all of it.

B(\tangle{t}) = \val[%.3f]{(1 - t) ** 3}\,P_0 + \val[%.3f]{3 * (1 - t) ** 2 * t}\,P_1 + \val[%.3f]{3 * (1 - t) * t ** 2}\,P_2 + \val[%.3f]{t ** 3}\,P_3

Things to notice

How it's built

Open the source panels above for the full markup, script and styles.