Line segment clipping is a basic operation of the visualization process in computer graphics. So far there exist four computational models for clipping a line segment against a window, (1) the encoding, (2) the parametric, (3) the geometric transformation, and (4) the parallel cutting. This paper presents an algorithm that is based on the third method. By making use of symmetric properties of a window and transformation operations, both endpoints of a line segment are transformed, so that the basic cases are reduced into two that can be easily handled, thus the problems in NLN and AS where there are too many sulyprocedure calls and basic cases that are difficult to deal with are tackled. Both analytical and experimental results from random input data show that the algorithm is better than other developed ones, in view of the speed and the number of operations.
展开▼