# DREXEL CS 536 - p253-nicholl (10 pages)

Previewing pages 1, 2, 3 of 10 page document
View Full Document

## p253-nicholl

Previewing pages 1, 2, 3 of actual document.

View Full Document
View Full Document

## p253-nicholl

79 views

Lecture Notes

Pages:
10
School:
Drexel University
Course:
Cs 536 - Computer Graphics
##### Computer Graphics Documents
• 13 pages

• 14 pages

Unformatted text preview:

ComputerGraphics Volume21 Number4 July 1987 AN EFFICIENT NEW ALGORITHM FOR 2 D LINE ITS DEVELOPMENT AND ANALYSIS CLIPPING Tma M Nteholl D T Lee and Robin A Nieholl Department of Computer Science The University of Western Ontario London CANADA N6A 5B7 t and Department of Electrical Engineering and Computer Science Northwestern University Evanston Illinois 60201 U S A ABSTRACT I I N T R O D U C T I O N This paper describes a new algorithm for clipping a line in two In the most general sense clipping is the evaluation of the dimensions against a rectangular window Dais algorithm avoids computation of intersection points which are not end intersection between two geometrical entities These geometrical entities may be points llne segments rectangles points of the output line segment The performance of this algorithm is shown to be consistently better than existing algorithrns including the Cohen Suthedand and Liang Barsky algorithms This performance comparison is machine polygons polyhedrons curves surfaces and so on or assemblies of these In this paper we will restrict ourselves to computing the intersection between a line segment and a rectilinear rectangle which we call a window in two dimensions independent based on an analysis of the number of arithmetic operations and comparisons required by the different algo Assume that we have a line segment with endpoints xl yl rithrns We first present the algorithm using procedures which perform geometric transformations to exploit symmetry pro and x2 y2 and a window represented by four real numbers xleft ytop xright and ybottom The window is defined as the perties and then show how program transformation techniques may be used to eliminate the extra statements involved in per set of all points x y such that deft x xright and ybottom y ytop The intersection if not empty is a continuous forming geometric transformations portion of the line segment and so can be represented by two endpoints Thus we must determine i f the

View Full Document

Unlocking...