A bezier curve isn’t that hard to draw yourself. Given three points
A,
B,
Cyou require three linear interpolations in order to draw the curve. We use
the scalar
tas the parameter for the linear interpolation:
P0 = A * t + (1 - t) * BP1 = B * t + (1 - t) * C
This interpolates between two edges we’ve created, edge AB and edge BC. The
only thing we now have to do to calculate the point we have to draw is
interpolate between P0 and P1 using the same t like so:
Pfinal = P0 * t + (1 - t) * P1
There are a couple of things that need to be done before we actually draw the
curve. First off we have will walk some
dt(delta t) and we need to be aware
that
0 <= t <= 1. As you might be able to imagine, this will not give us a
smooth curve, instead it yields only a discrete set of positions at which to
plot. The easiest way to solve this is to simply draw a line between the
current point and the previous point.



