Download presentation
Presentation is loading. Please wait.
Published byMartin Matthews Modified over 8 years ago
1
Institute for Visualization and Perception Research 1 © Copyright 2000 Haim Levkowitz Raster graphics alg’s for drawing 2D primitives Points of view Application programmer's Package implementor's Scan-converted clipped primitives
2
Institute for Visualization and Perception Research 2 © Copyright 2000 Haim Levkowitz Overview … Implications of display-system architecture … Output pipeline...
3
Institute for Visualization and Perception Research 3 © Copyright 2000 Haim Levkowitz Implications of disp-sys architecture … Output & input pipelines … Displays with frame buffers & display controllers … Displays with frame buffers only … Hardcopy devices...
4
Institute for Visualization and Perception Research 4 © Copyright 2000 Haim Levkowitz Output & input pipelines Output Input
5
Institute for Visualization and Perception Research 5 © Copyright 2000 Haim Levkowitz Output Primitive-generation function: What to generate Attribute functions: How to generate copyPixel: How to modify image Canvas-control functions: Where
6
Institute for Visualization and Perception Research 6 © Copyright 2000 Haim Levkowitz Input User interaction (display) --> measure values ==> modify model or image
7
Institute for Visualization and Perception Research 7 © Copyright 2000 Haim Levkowitz Displays with frame buffers & display controllers …
8
Institute for Visualization and Perception Research 8 © Copyright 2000 Haim Levkowitz Displays with frame buffers only …
9
Institute for Visualization and Perception Research 9 © Copyright 2000 Haim Levkowitz Hardcopy devices … One scan line at a time Package: generate complete bitmap Scan out 1 line at a time Entire frame (page) Raster Image Processor (RIP): built-in scan-conversion HW PostScript engine: interpret program Device independent ==> Primitives + attributes
10
Institute for Visualization and Perception Research 10 © Copyright 2000 Haim Levkowitz Output Pipeline … Clip primitives then scan-convert ==> Fewer to scan-convert Scissoring: Scan-covert then clip Write only visible pixels Temp. canvas, copy only clip rectangle Wastes time & space Easy to implement Often for text Incremental methods: minimize number of calculations
11
Institute for Visualization and Perception Research 11 © Copyright 2000 Haim Levkowitz Scan Converting Primitives primitives
12
Institute for Visualization and Perception Research 12 © Copyright 2000 Haim Levkowitz Clipping Overview – Hearn & Baker Ch. 6
13
Institute for Visualization and Perception Research 13 © Copyright 2000 Haim Levkowitz
14
Institute for Visualization and Perception Research 14 © Copyright 2000 Haim Levkowitz
15
Institute for Visualization and Perception Research 15 © Copyright 2000 Haim Levkowitz
16
Institute for Visualization and Perception Research 16 © Copyright 2000 Haim Levkowitz
17
Institute for Visualization and Perception Research 17 © Copyright 2000 Haim Levkowitz Clipping endpoints … Cases for clipping lines … Solving simultaneous equations … Cohen-Sutherland Algorithm … Parametric Line-Clipping Algorithm...
18
Institute for Visualization and Perception Research 18 © Copyright 2000 Haim Levkowitz Clipping endpoints x min x x max y min y y max
19
Institute for Visualization and Perception Research 19 © Copyright 2000 Haim Levkowitz Cases for clipping lines …
20
Institute for Visualization and Perception Research 20 © Copyright 2000 Haim Levkowitz Solving Simultaneous Equations … Both endpoints inside ==> trivially accept One inside, one outside ==> find intersection point Both outside: may / may not intersect Brute force: line equation + clip rectangle edges equation
21
Institute for Visualization and Perception Research 21 © Copyright 2000 Haim Levkowitz Cohen-Sutherland Algorithm … 1. Check endpoints: trivially accept? 2. Region checks: trivially reject? 3. Divide into 2 segments s.t. one can be trivially rejected Iterative clip Trivially accept? / reject? Example …
22
Institute for Visualization and Perception Research 22 © Copyright 2000 Haim Levkowitz Cohen-Sutherland (cont.)
23
Institute for Visualization and Perception Research 23 © Copyright 2000 Haim Levkowitz Cohen-Sutherland example
24
Institute for Visualization and Perception Research 24 © Copyright 2000 Haim Levkowitz Parametric Line-Clipping -- overview Example...
25
Institute for Visualization and Perception Research 25 © Copyright 2000 Haim Levkowitz Parametric Line-Clipping example
26
Institute for Visualization and Perception Research 26 © Copyright 2000 Haim Levkowitz Parametric Line-Clipping -- theory in detail http://www.siggraph.org/education/materi als/HyperGraph/scanline/clipping/lbth.htm
27
Institute for Visualization and Perception Research 27 © Copyright 2000 Haim Levkowitz Parametric Line-Clipping -- The algorithm http://www.siggraph.org/education/materi als/HyperGraph/scanline/clipping/lbalg.ht m
28
Institute for Visualization and Perception Research 28 © Copyright 2000 Haim Levkowitz Parametric Line-Clipping – detailed example http://www.siggraph.org/education/materi als/HyperGraph/scanline/clipping/lbex.htm
29
Institute for Visualization and Perception Research 29 © Copyright 2000 Haim Levkowitz Clipping circles and ellipses Accept / reject against square extent If intersects, divide into quadrants, repeat accept / reject Divide into octants if necessary Compute intersection of edge-circle analytically Simultaneous equations Scan convert resulting arcs Fast scan conversion ==> scissoring faster Filled: clip spans then fill
30
Institute for Visualization and Perception Research 30 © Copyright 2000 Haim Levkowitz Clipping Polygons General … Sutherland-Hodgman Algorithm … Four cases …
31
Institute for Visualization and Perception Research 31 © Copyright 2000 Haim Levkowitz
32
Institute for Visualization and Perception Research 32 © Copyright 2000 Haim Levkowitz General
33
Institute for Visualization and Perception Research 33 © Copyright 2000 Haim Levkowitz Sutherland-Hodgman Algorithm
34
Institute for Visualization and Perception Research 34 © Copyright 2000 Haim Levkowitz Four cases
35
Institute for Visualization and Perception Research 35 © Copyright 2000 Haim Levkowitz
36
Institute for Visualization and Perception Research 36 © Copyright 2000 Haim Levkowitz
37
Institute for Visualization and Perception Research 37 © Copyright 2000 Haim Levkowitz
38
Institute for Visualization and Perception Research 38 © Copyright 2000 Haim Levkowitz Antialiasing Increasing resolution … Area sampling … Weighted Unweighted Other
39
Institute for Visualization and Perception Research 39 © Copyright 2000 Haim Levkowitz Increasing Resolution Best, but Limitations Jaggies / staircasing Aliasing / antialiasing
40
Institute for Visualization and Perception Research 40 © Copyright 2000 Haim Levkowitz Area sampling Area represented by pixel Unweighted area sampling All pixels equal Weighted area sampling Some contribute more than others Based on weight function
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.