{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# Edges discard all t 0 and t 1 classify each remaining

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: t • t = NL [PL – P0] / -NL [P1 - P0] Inside NL P1 Cyrus-Beck Algorithm Compute t for line intersection with all four edges Discard all (t < 0) and (t > 1) Classify each remaining intersection as • Potentially Entering (PE) • Potentially Leaving (PL) NL [P1 - P0] > 0 implies PL NL [P1 - P0] < 0 implies PE • Note that we computed this term when computing t Cyrus-Beck Algorithm Compute PE with largest t Compute Compute PL with smallest t Clip to these two points PE P0 PE PL PL P1 Cyrus-Beck Algorithm Because of horizontal and vertical clip lines: • Many computations reduce Normals: (-1, 0), (1, 0), (0, -1), (0, 1) Pick constant points on edges solution for t: • -(x0 - xleft) / (x1 - x0) • (x0 - xright) / -(x1 - x0) • -(y0 - ybottom) / (y1 - y0) • (y0 - ytop) / -(y1 - y0) Comparison Cohen-Sutherland • Repeated clipping is expensive • Best used when trivial acceptance and rejection is possible for most lines Cyrus-Beck • Computation of t-intersections is cheap • Computation of (x,y) clip points...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online