Page 1 2/3/2000 CS 4/57101 Lecture 6 1 Polygon Filling ? 2 parts to task ? which pixels to fill ? what to fill them with ? First consider filling unclipped primitives with solid color ? Which pixels to fill ? consider scan lines that intersect primitive ? fill in spans of pixels lying inside primitive ? exploit spatial coherence, span coherence, scan-line coherence, edge coherence ? Can write frame buffer one word at time rather than one bit Page 2 2/3/2000 CS 4/57101 Lecture 6 1 Polygon Filling ? 2 parts to task ? which pixels to fill ? what to fill them with ? First consider filling unclipped primitives with solid color ? Which pixels to fill ? consider scan lines that intersect primitive ? fill in spans of pixels lying inside primitive ? exploit spatial coherence, span coherence, scan-line coherence, edge coherence ? Can write frame buffer one word at time rather than one bit 2/3/2000 CS 4/57101 Lecture 6 2 Line Segments Sharing Pixels ? Important not to write pixels twice ? could be set to background color if xor used ? could be double intensity (film writer) ? Is boundary part of an area defining primitive ? mathematically yes ? graphically more complicated ? Rule: left and bottom edges are part of primitive ? shared vertical edges belong to rightmost primitive ? Still problems ? bottom left point still drawn twice ? rectangles missing right and top edges !! Page 3 2/3/2000 CS 4/57101 Lecture 6 1 Polygon Filling ? 2 parts to task ? which pixels to fill ? what to fill them with ? First consider filling unclipped primitives with solid color ? Which pixels to fill ? consider scan lines that intersect primitive ? fill in spans of pixels lying inside primitive ? exploit spatial coherence, span coherence, scan-line coherence, edge coherence ? Can write frame buffer one word at time rather than one bit 2/3/2000 CS 4/57101 Lecture 6 2 Line Segments Sharing Pixels ? Important not to write pixels twice ? could be set to background color if xor used ? could be double intensity (film writer) ? Is boundary part of an area defining primitive ? mathematically yes ? graphically more complicated ? Rule: left and bottom edges are part of primitive ? shared vertical edges belong to rightmost primitive ? Still problems ? bottom left point still drawn twice ? rectangles missing right and top edges !! 2/3/2000 CS 4/57101 Lecture 6 3 Polygon Types ? simple convex, simple concave, non-simple (self- intersecting) ? want no holes, no intersections (line crossings) ? rectangles and triangles always simple convex Page 4 2/3/2000 CS 4/57101 Lecture 6 1 Polygon Filling ? 2 parts to task ? which pixels to fill ? what to fill them with ? First consider filling unclipped primitives with solid color ? Which pixels to fill ? consider scan lines that intersect primitive ? fill in spans of pixels lying inside primitive ? exploit spatial coherence, span coherence, scan-line coherence, edge coherence ? Can write frame buffer one word at time rather than one bit 2/3/2000 CS 4/57101 Lecture 6 2 Line Segments Sharing Pixels ? Important not to write pixels twice ? could be set to background color if xor used ? could be double intensity (film writer) ? Is boundary part of an area defining primitive ? mathematically yes ? graphically more complicated ? Rule: left and bottom edges are part of primitive ? shared vertical edges belong to rightmost primitive ? Still problems ? bottom left point still drawn twice ? rectangles missing right and top edges !! 2/3/2000 CS 4/57101 Lecture 6 3 Polygon Types ? simple convex, simple concave, non-simple (self- intersecting) ? want no holes, no intersections (line crossings) ? rectangles and triangles always simple convex 2/3/2000 CS 4/57101 Lecture 6 4 Convex, Concave, Degenerate ? Convex polygons are preferable to concave ? Polygon is convex if for any two points inside polygon, the line segment joining these two points is also inside. ? Degeneracies Page 5 2/3/2000 CS 4/57101 Lecture 6 1 Polygon Filling ? 2 parts to task ? which pixels to fill ? what to fill them with ? First consider filling unclipped primitives with solid color ? Which pixels to fill ? consider scan lines that intersect primitive ? fill in spans of pixels lying inside primitive ? exploit spatial coherence, span coherence, scan-line coherence, edge coherence ? Can write frame buffer one word at time rather than one bit 2/3/2000 CS 4/57101 Lecture 6 2 Line Segments Sharing Pixels ? Important not to write pixels twice ? could be set to background color if xor used ? could be double intensity (film writer) ? Is boundary part of an area defining primitive ? mathematically yes ? graphically more complicated ? Rule: left and bottom edges are part of primitive ? shared vertical edges belong to rightmost primitive ? Still problems ? bottom left point still drawn twice ? rectangles missing right and top edges !! 2/3/2000 CS 4/57101 Lecture 6 3 Polygon Types ? simple convex, simple concave, non-simple (self- intersecting) ? want no holes, no intersections (line crossings) ? rectangles and triangles always simple convex 2/3/2000 CS 4/57101 Lecture 6 4 Convex, Concave, Degenerate ? Convex polygons are preferable to concave ? Polygon is convex if for any two points inside polygon, the line segment joining these two points is also inside. ? Degeneracies 2/3/2000 CS 4/57101 Lecture 6 5 Polygon Representation ? Polygon Representation ? ordered list of vertices ? avoids redundant storage and computations ? associate other information with vertices | colors, normals, texturesRead More

Offer running on EduRev: __Apply code STAYHOME200__ to get INR 200 off on our premium plan EduRev Infinity!