Bézier Curves by the De Casteljau Algorithm
We will construct what is called the quadratic
Bézier curve by means of a geometric algorithm. (We will see where the "quadratic"
terminology comes from soon.)
- First, draw segments AB and
BC and relabel as A1, A2, A3. Construct the point B1 as a point on segment
A1A2.
- Measure the ratio A1B1/A1A2.
We will think of this ratio as t, so you may want to repeat the measurement
and relabel it as t as in the figure.
- Now construct B2 so that A1B1/A1A2
= A2B2/A2A3 = t. [Select the ratio t and choose Mark Scale Factor in the Transform
menu. Then Mark A2 as center and dilate point A3 to get A3', which we relabel
as B2.]
- Next construct segment B1B2
and construct point C1 on the segment by dilating B2 with center B1 and ratio
t.
- Now if you drag B1 all the
points B2 and C1 should move "in tandem" with the same barycentric
coordinates on their respective segments. You can create an animation button
for B1 on segment A1A2 if you like.
- Now construct the locus of
C1 by selecting C1 and B1 and choosing Locus on the Construct menu.
- Finally, hide the points B1,B2,C1
and segment B1B2 and the ratio. Select the figure, including the locus and
Make a New Tool. Check in a new page of your Sketch that this tool constructs
the locus. In a new figure draw points A, B, C, D, E and construct two Bezier
curves given by A, B, C and also C, D, E. Notice that they do not fit together
very smoothly unless B, C and D are collinear.
Higher Bézier Curves by the De Casteljau Algorithm
We will construct what is called the cubic Bézier
curve by taking the previous construction a step further. These curves are called
Cubic Bézier Curves. Again we will see where the "cubic" comes in
soon.
- Draw points A1, A2, A3, A4
in a new sketch and construct point B1 as a point on segment A1A2.
- Measure the ratio A1B1/A1A2
as before and call it t. Mark Scale Factor as t.
- As before construct point B2
and also point B3 so that t = A2B2/A2A3 = A3B3/A3A4.
- Now you have points B1, B2,
B3 that all move according to ratio t. But B1, B2, B3 forms a figure like
the A1, A2, A3 of the quadratic case. So complete the construction of new
points as you did in that case, to get C1, C2 and also D1, all with dilations
using the same ratio t but different centers.
- Finally, select point D1 and
point B1 and choose Locus from the Construct menu. If you hide the construction
and the ratio, you can select the locus and the points A1, A2, A3, A4 and
make a script that will draw the locus. Reorder the Givens if necessary to
have the order A1, A2, A3, A4. (Do this by dragging in the Script window.)
- Now apply the script to see
how cubics are used in computer graphics. In a new sketch, draw points P1,
P2, Q1, Q2, R1, R2. Construct Q2' by rotating Q2 by 180 degrees with center
Q1. Now apply the script first to P1, P2, Q2', Q1 and then Q1, Q2, R1, R2.
See how the cubics fit together.