Lecture_Chapter5_b

Before perspective division we clip primitives by

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

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ertex Processor Clipper and Assembler Rasterizer Fragment Processor 3D Triangles Clipped Triangles 2D Triangles Fragments ECS 175 Chapter 5: 3D – Projections, Camera, and Lighting 25 Clipping •  Before perspective division, we clip primitives by testing in clip coordinates (this is how it is done in OpenGL): − w p ≤ xp ≤ w p − w p ≤ yp ≤ w p − w p ≤ zp ≤ w p ECS 175 Chapter 5: 3D – Projections, Camera, and Lighting 26 Line Clipping •  2D •  Clipping requires information about connectivity (OpenGL: GL_LINES, …) ECS 175 Chapter 5: 3D – Projections, Camera, and Lighting 27 Cohen-Sutherland Clipping •  Compute ‘outcodes’ for endpoints to distinguish cases Four cases: o1 = o2 = 0 o1 ￿= 0, o2 = 0 (o1 & o2 ) ￿= 0 o1 = 0, o2 ￿= 0 (o1 & o2 ) = 0 ECS 175 Chapter 5: 3D – Projections, Camera, and Lighting OR 28 Liang-Barsky Clipping •  Clipping performed for parametric line representations f (u) = (1 − u) · A + u · B Intersect with extended window edges ECS 175 Chapter 5: 3D – Projections, Camera, and Lighting 29 L...
View Full Document

This document was uploaded on 03/12/2014 for the course ECS 175 at UC Davis.

Ask a homework question - tutors are online