CHAPTER 7 - Implementation 1

Objectives


Meta Algorithms


Common Tasks


Line Segment Clipping (CLIPPER)



Clipping 2D Line Segments


Cohen-Sutherland Algorithm


The Cases


The Cases


Defining Outcodes


Using Outcodes


Using Outcodes



Using Outcodes



Using Outcodes


>


Efficiency


Cohen Sutherland in 3D


Liang-Barsky Clipping (more efficient)


Liang-Barsky Clipping

If the line is parallel to a clip boundary this special case is handled easily and in the case where it is not parallel

>


Advantages


Clipping and Normalization


Plane-Line Intersections (6 multiplications- 2 each for x, y, z - and 1 division)

>


Normalized Form


<next>