Presentation is loading. Please wait.

Presentation is loading. Please wait.

Graphics Graphics Korea University cgvr.korea.ac.kr Raster Graphics 고려대학교 컴퓨터 그래픽스 연구실.

Similar presentations


Presentation on theme: "Graphics Graphics Korea University cgvr.korea.ac.kr Raster Graphics 고려대학교 컴퓨터 그래픽스 연구실."— Presentation transcript:

1 Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr Raster Graphics 고려대학교 컴퓨터 그래픽스 연구실

2 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Contents Display Hardware How are images display? Raster Graphics Systems How are imaging system organized Output Primitives How can we describe shapes with primitives? Color Models How can we describe and represent colors?

3 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Bresenham’s Line Algorithm Accurate and Efficient Use only incremental integer calculations Test the sign of an integer parameter Case) Positive Slope Less Than 1 After the pixel ( x k, y k ) is displayed, next which pixel is decided to plot in column x k+1 ?  ( x k +1, y k ) or ( x k +1, y k +1 ) xkxk ykyk x k +1 y k +1

4 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Bresenham’s Algorithm(cont.) Case) Positive Slope Less Than 1 y at sampling position x k Difference Decision parameter xkxk ykyk x k +1 y k +1 d 1 – d 2 < 0  (x k +1, y k ) d 1 – d 2 > 0  (x k +1, y k +1) d1d1 d2d2

5 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Bresenham’s Algorithm(cont.) Case) Positive Slope Less Than 1 Decision parameter Decision parameter of a starting pixel ( x 0, y 0 )

6 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Bresenham’s Algorithm(cont.) Algorithm for 0< m <1 Input the two line endpoints and store the left end point in ( x 0, y 0 ) Load ( x 0, y 0 ) into the frame buffer; that is, plot the first point Calculate constants Δx, Δy, 2Δy, and 2Δy− 2Δx, and obtain the starting value for the decision parameter as At each x k along the line, start at k =0, perform the following test:  If p k < 0, the next point to plot is ( x k +1, y k ) and  Otherwise, the next point to plot is ( x k +1, y k +1 ) and Repeat step 4 Δx times

7 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Polygons Filling Polygons Scan-line fill algorithm  Inside-Outside tests Boundary fill algorithm 123456789 1234 6789 10 11 5

8 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Scan-Line Polygon Fill Topological Difference between 2 Scan lines y : intersection edges are opposite sides y’ : intersection edges are same side y y’ 1 2 1 12

9 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Scan-Line Polygon Fill (cont.) Edge Sorted Table C C’ B D E A 0 1 yAyA yDyD yCyC Scan-Line Number yEyE xAxA 1/m AE yByB xAxA 1/m AB y C’ xDxD 1/m DC yEyE xDxD 1/m DE yByB xCxC 1/m CB

10 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Inside-Outside Tests Self-Intersections Odd-Even rule Nonzero winding number rule exterior interior

11 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Boundary-Fill Algorithm Proceed to Neighboring Pixels 4-Connected 8-Connected

12 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Antialiasing Aliasing Undersampling: Low-frequency sampling Nyquist sampling frequency: Nyquist sampling interval: original sample reconstruct

13 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Antialiasing (cont.) Supersampling (Postfiltering) Pixel-weighting masks Area Sampling (Prefiltering) Pixel Phasing Shift the display location of pixel areas Micropositioning the electron beam in relation to object geometry

14 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Supersampling Subpixels Increase resolution 101112 20 21 22 (10, 20): Maximum Intensity (11, 21): Next Highest Intensity (11, 20): Lowest Intensity

15 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Supersampling Subpixels Increase resolution 101112 20 21 22 (10, 20): Maximum Intensity (11, 21): Next Highest Intensity (11, 20): Lowest Intensity

16 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Pixel-Weighting Masks Give More Weight to Subpixels Near the Center of a Pixel Area 121 242 121

17 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Area Sampling Set Each Pixel Intensity Proportional to the Area of Overlap of Pixel 2 adjacent vertical (or horizontal) screen grid lines  trapezoid 101112 20 21 22 (10, 20): 90% (10, 21): 15%

18 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Filtering Techniques Filter Functions (Weighting Surface) Box FilterCone FilterGaussian Filter

19 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Contents Display Hardware How are images display? Raster Graphics Systems How are imaging system organized? Output Primitives How can we describe shapes with primitives? Color Models How can we describe and represent colors?

20 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Electromagnetic Spectrum Visible Light Frequencies Range between Red: 4.3 x 10 14 hertz (700nm) Violet: 7.5 x 10 14 hertz (400nm)

21 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Visible Light The Color of Light is Characterized by Hue: dominant frequency (highest peak) Saturation: excitation purity (ratio of highest to rest) Brightness: luminance (area under curve) White Light Orange Light

22 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Color Perception Tristimulus Theory of Color Spectral-response functions of each of the three types of cones on the human retina

23 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Color Models RGB XYZ CMY HSV Others

24 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr RGB Color Model Colors are Additive R GBColor 0.0 Black 1.0 0.0 Red 0.0 1.00.0Green 1.0 0.0Yellow 1.0 0.01.0Magenta 0.0 1.0 Cyan 1.0 White 0.0 1.0Blue

25 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr RGB Color Cube

26 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr RGB Spectral Colors Amounts of RGB Primaries Needed to Display Spectral Colors

27 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr XYZ Color Model (CIE) Amounts of CIE Primaries Needed to Display Spectral Colors

28 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr CIE Chromaticity Diagram Normalized Amounts of X and Y for Colors in Visible Spectrum (white)

29 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr CIE Chromaticity Diagram Define Color Gamuts Represent Complementary Color Determine Dominant Wavelength and Purity

30 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr RGB Color Gamut Color Gamut for a Typical RGB Computer Monitor (red) (green) (blue)

31 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr CMY Color Model Colors are Subtractive C MYColor 0.0 White 1.0 0.0 Cyan 0.0 1.00.0Magenta 1.0 0.0Blue 1.0 0.01.0Green 0.0 1.0 Red 1.0 Black 0.0 1.0Yellow

32 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr CMY Color Cube

33 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr HSV Color Model Select a Spectral Color (Hue) and the Amount of White (Saturation) and Black (Value)

34 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr HSV Color Model H SVColor 0 1.0 Red 60 1.0 Yellow 120 1.0 Green 240 1.0 Blue 300 1.0 Magenta * 0.01.0White * 0.00.5Gray 180 1.0 Cyan * *0.0Black

35 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr HSV Color Model Cross Section of the HSV Hexcone


Download ppt "Graphics Graphics Korea University cgvr.korea.ac.kr Raster Graphics 고려대학교 컴퓨터 그래픽스 연구실."

Similar presentations


Ads by Google