210 likes | 364 Vues
Raster Graphics. 고려대학교 컴퓨터 그래픽스 연구실. 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?. Display Hardware.
E N D
Raster Graphics 고려대학교 컴퓨터 그래픽스 연구실 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? cgvr.korea.ac.kr
Display Hardware • Video Display Devices • Cathode Ray Tube (CRT) • Liquid Crystal Display (LCD) • Plasma panels • Thin-film electroluminescent display • Light-emitting diodes (LED) • Hard-Copy Devices • Ink-jet printer • Laser printer • Film recorder • Electrostatic printer • Pen plotter cgvr.korea.ac.kr
Cathode Ray Tube (CRT) cgvr.korea.ac.kr
Liquid Crystal Display (LCD) cgvr.korea.ac.kr
Raster Graphics cgvr.korea.ac.kr
Frame Buffer cgvr.korea.ac.kr
Frame Buffer Refresh • Refresh Rate • Usually 30~75 Hz cgvr.korea.ac.kr
255 255 255 150 150 150 75 75 75 0 0 0 255 255 255 150 150 150 75 75 75 0 0 0 255 255 255 150 150 150 75 75 75 0 0 0 255 255 255 150 150 150 75 75 75 0 0 0 255 255 255 150 150 150 75 75 75 0 0 0 Color Frame Buffer Blue channel Green channel Red channel cgvr.korea.ac.kr
Color CRT 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? cgvr.korea.ac.kr
Output Primitives • Points • Lines • DDA Algorithm • Bresenham’s Algorithm • Polygons • Scan-Line Polygon Fill • Inside-Outside Tests • Boundary-Fill Algorithm • Antialiasing cgvr.korea.ac.kr
Points • Single Coordinate Position • Set the bit value(color code) corresponding to a specified screen position within the frame buffer y setPixel (x, y) x cgvr.korea.ac.kr
Lines • Intermediate Positions between Two Endpoints • DDA, Bresenham’s line algorithms Jaggies = Aliasing cgvr.korea.ac.kr
y2 y1 x1 x2 DDA Algorithm • Digital Differential Analyzer • 0 < Slope <= 1 • Unit x interval = 1 cgvr.korea.ac.kr
y2 y1 x1 x2 DDA Algorithm • Digital Differential Analyzer • 0 < Slope <= 1 • Unit x interval = 1 • Slope > 1 • Unit y interval = 1 cgvr.korea.ac.kr
y1 y2 x1 x2 DDA Algorithm • Digital Differential Analyzer • 0 < Slope <= 1 • Unit x interval = 1 • Slope > 1 • Unit y interval = 1 • -1 <= Slope < 0 • Unit x interval = -1 cgvr.korea.ac.kr
y2 y1 x1 x2 DDA Algorithm • Digital Differential Analyzer • Slope >= 1 • Unit x interval = 1 • 0 < Slope < 1 • Unit y interval = 1 • -1 <= Slope < 0 • Unit x interval = -1 • Slope < -1 • Unit y interval = -1 cgvr.korea.ac.kr
Bresenham’s Line Algorithm • Midpoint Line Algorithm • Decision variable • d > 0 : choose NE • : dnew= dold+a+b • d <= 0 : choose E • : dnew= dold+a NE Q M P(xp, yp) E cgvr.korea.ac.kr
Bresenham’s Algorithm(cont.) • Initial Value of d • Update d cgvr.korea.ac.kr