Previous Next


                                               228
CHAPTER 4                                                                      Graphics



Cubic Bézier curves have two useful properties:

• The curve can be very quickly split into smaller pieces for rapid rendering.
• The curve is contained within the convex hull of the four points defining the
  curve, most easily visualized as the polygon obtained by stretching a rubber
  band around the outside of the four points. This property allows rapid testing
  of whether the curve lies completely outside the visible region, and hence does
  not have to be rendered.

The Bibliography lists several books that describe cubic Bézier curves in more
depth.

The most general PDF operator for constructing curved path segments is the c
operator, which specifies the coordinates of points P1 , P2 , and P3 explicitly, as
shown in Figure 4.8. (The starting point, P0 , is defined implicitly by the current
point.)



                                               P2 (x2 , y2 )
                        P1 (x1, y1 )




                                                               P3 (x3 , y3 )




                   P0 (current point)

                                        x1 y1 x2 y2 x3 y3 c



              FIGURE 4.8 Cubic Bézier curve generated by the c operator

Previous Next