Areas with curved boundaries can be clipped with
methods similar to those discussed in the previous .sections. Curve-clipping
procedures will involve nonlinear equations, however, and this requires more
processing than for objects with linear boundaries. The bounding rectangle for
a circle or other curved object can be used first to test for overlap
with a rectangular clip window. If the bounding rectangle for the object is
completely inside the window, we save the object. If the rectangle is determined
to be completely outs depth e window,
we discard the object. In either case, there is no further computation
necessary. But if the bounding rectangle test fails, we can look for other
computation-saving approaches. For a circle, we can use the coordinate extents
of individual quadrants and then octants for preliminary
testing before calculating
curve-window intersections. For an ellipse, we can test the coordinate extents
of individual quadrants.
Similar procedures can be applied
when clipping a curved object against a general polygon clip region. On the
first pass, we can clip the bounding rectangle of the object against the
bounding rectangle of the clip region. If the two regions overlap, we will need
to solve the simultaneous line-curve equations to obtain the clipping
intersection points
No comments:
Post a Comment