Graphics Programs Reference
In-Depth Information
300 200 m 400 300 500 400 600 200 c S
We use the m operator to move the current point to the start of the curve. The c operator
takes three more coordinates: the first control point, second control point, and end
point.
For more information on Bézier curves, consult a graphics text—see “PDF and Graphics
Documentation” on page 119 .
Figure 5-3. A Bézier curve
Drawing circles with Bézier curves
Interestingly, it's not possible to draw exact circles in PDF. But we can use several Bézier
curves to approximate one closely. We'll use four symmetric curves (the minimum
number to get a good result), one for each quadrant. For a specimen quadrant of the
unit circle centered at (1, 0), the coordinates are shown in Figure 5-4 . The number k is
about 0.553.
 
Search WWH ::




Custom Search