Graphics & Visualization Chapter 1 Introduction Graphics & Visualization: Principles & Algorithms
Brief History • Milestones in the history of computer graphics: 2 Graphics & Visualization: Principles & Algorithms Chapter 1
Brief History (2) • CPU Vs GPU 3 Graphics & Visualization: Principles & Algorithms Chapter 1
Applications • Special effects for films and advertisements • Scientific exploration through visualization • Interactive simulation • Computer games • Computer-aided geometric design and solid modeling (CAGD) • Graphical user interfaces (GUIs) • Computer art 4 Graphics & Visualization: Principles & Algorithms Chapter 1
Concepts • 3D or 2D scenes are composed of primitives (e.g. points, lines, curves, polygons, mathematical solids or functions) • A raster image is a 2D array of pixels • Computer Graphics use principles and algorithms to generate from a scene, a raster image that can be depicted on a display device • Scene � Computer Graphics � Raster Image 5 Graphics & Visualization: Principles & Algorithms Chapter 1
Concepts (2) • Rasterization steps for a two-dimensional document 6 Graphics & Visualization: Principles & Algorithms Chapter 1
Concepts (3) • Visualization exploits visual presentation of large data sets to increase understanding • The result of visualization is a visualization object • Modeling encompasses techniques for the representation of graphical objects • Data Set � Visualization � Model • Graphics Pipeline is a sequence of stages that create a digital image out of a model • Model � Graphics Pipeline � Image 7 Graphics & Visualization: Principles & Algorithms Chapter 1
Graphics Pipeline 8 Graphics & Visualization: Principles & Algorithms Chapter 1
Graphics Pipeline (2) • Operations on primitives in the standard direct rendering graphics pipeline : 9 Graphics & Visualization: Principles & Algorithms Chapter 1
Graphics Pipeline (3) • For the above example: (a) Geometry transformation to a common reference frame and view frustum culling. (b) Primitives after viewing transformation, projection, and backface culling. (c) Rasterization (d) fragment depth sorting: the darker a shade, the nearer the corresponding point is to the virtual camera. (e) Material color estimation. (f) Shading and other fragment operations (such as fog). 10 Graphics & Visualization: Principles & Algorithms Chapter 1
Image Buffers Storage and Encoding of Digital Images : • Image buffer is a 2D array of dimensions w x h • Size of the image buffer is at least ( w x h x bpp ) / 8 bytes • Color depth (bpp) : # bits used to store the color of each pixel • Color representations: � Monochromatic (grayscale) True-color � Multi-channel (red/green/blue) � Palleted (CLUT) • True-color : image buffer stores full color intensity information of each pixel • Color look – up table (CLUT): � bits per pixel do not affect the accuracy of the displayed color 11 Graphics & Visualization: Principles & Algorithms Chapter 1
Image Buffers (2) • Image buffer with CLUT: • Image buffers occupy contiguous space of memory 12 Graphics & Visualization: Principles & Algorithms Chapter 1
Image Buffers (3) Frame Buffer: � memory where all pixel color information from rasterization is accumulated before being driven to the graphics output � double buffering Depth Buffer or Z-buffer: � stores distance values � used for hidden surface elimination Other Buffers: � Stencil Buffer � Accumulation Buffer 13 Graphics & Visualization: Principles & Algorithms Chapter 1
Graphics Hardware Image - Generation hardware: • Display adapters • Double Buffering: � 2 frame buffers, buffer swapping • 2D graphics accelerators: � Apply 2D rasterization algorithms � Partially freeing CPU • 3D graphics accelerators: � Adoption of Z-buffer algorithm � Completely freeing CPU � Parallelism • Programmable graphics hardware � 2 types of shaders (vertex, fragment) 14 Graphics & Visualization: Principles & Algorithms Chapter 1
Graphics Hardware (2) Image - Output hardware: • Display monitors � Cathode ray tube (CRT) � Liquid crystal displays (LCD) � Thin – film transistor (TFT) 15 Graphics & Visualization: Principles & Algorithms Chapter 1
Graphics Hardware (3) • Projection systems � 2 projection methods (rear, front) � 3 projection technologies (CRT, LCD, DLP) • Printer graphics � Raster image is converted to dots � Different shades achieved using halftoning • Printer technologies � Inkjet printers � Laser printers 16 Graphics & Visualization: Principles & Algorithms Chapter 1
Conventions • Scalars : x, y, z • Vector quantities : � Points: a , b ��� � � � , , � Vectors: a b Oa ˆ ˆ , � Unit vectors: e n 1 • Matrices: M , R x � = [0 ,1 ,2] T � Column vectors: v • Functions: � Standard mathematical functions and custom functions: sin( θ ) � Functions follow the above conventions for scalar and vector quantities � • Norms: v • Standard sets : � � , • Algorithm descriptions are given in pseudocode based on standard C and C++ � • Advanced sections are marked with an asterisk 17 Graphics & Visualization: Principles & Algorithms Chapter 1
Recommend
More recommend