Another class of cubic polynomical curve is the Bézier curve. This is defined by a set of four control points, \(q_0\), \(q_1\), \(q_2\) and \(q_3\). Try moving the control points to see how this affects the shape of the curve.

The polynomial for the curve can be expressed in terms of a set of basis functions multiplied by the four control points, these are plotted in the graph above for each control point, and given in the equation for the x coordinate below (here \(q_0\) represents just the x component of control point \(q_0\), the same can be done with the y component to find the y coordinate for a given \(t\).

$$x(t)=(-t^3+3t^2-3t+1)q_0+(3t^3-6t^2+3t)q_1+(-3t^3+3t^2)q_2+t^3q_3$$

The curve passes through \(q_0\) at \(t=0\) and \(q_3\) at \(t=1\). For any \(t\) between zero and one, the basis functions sum to \(1\), which means that the curve must always lie within the convex hull of the four control points.