Upload
others
View
16
Download
0
Embed Size (px)
Citation preview
Graphics & Visualization: Principles & Algorithms Chapter 1 2
• Milestones in the history of computer graphics: Brief History
Graphics & Visualization: Principles & Algorithms Chapter 1 4
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
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
Graphics & Visualization: Principles & Algorithms Chapter 1 5
Concepts (2)• Rasterization steps for a two-dimensional document
Graphics & Visualization: Principles & Algorithms Chapter 1 6
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
Graphics & Visualization: Principles & Algorithms Chapter 1 7
Graphics Pipeline (2)• Operations on primitives in the standard direct rendering
graphics pipeline :
Graphics & Visualization: Principles & Algorithms Chapter 1 9
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).
Graphics & Visualization: Principles & Algorithms Chapter 1 10
Image BuffersStorage 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) 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
Graphics & Visualization: Principles & Algorithms Chapter 1 11
True-color
Image Buffers (2)• Image buffer with CLUT:
• Image buffers occupy contiguous space of memory
Graphics & Visualization: Principles & Algorithms Chapter 1 12
Image Buffers (3)Frame Buffer:
memory where all pixel color information from rasterization is accumulated before being driven to the graphics outputdouble buffering
Depth Buffer or Z-buffer:stores distance values used for hidden surface elimination
Other Buffers:Stencil BufferAccumulation Buffer
Graphics & Visualization: Principles & Algorithms Chapter 1 13
Graphics HardwareImage - 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 algorithmCompletely freeing CPUParallelism
• Programmable graphics hardware 2 types of shaders (vertex, fragment)
Graphics & Visualization: Principles & Algorithms Chapter 1 14
Graphics Hardware (2)Image - Output hardware:• Display monitors
Cathode ray tube (CRT)Liquid crystal displays (LCD)Thin – film transistor (TFT)
Graphics & Visualization: Principles & Algorithms Chapter 1 15
Graphics Hardware (3)• Projection systems
2 projection methods (rear, front)3 projection technologies (CRT, LCD, DLP)
• Printer graphicsRaster image is converted to dotsDifferent shades achieved using halftoning
• Printer technologiesInkjet printersLaser printers
Graphics & Visualization: Principles & Algorithms Chapter 1 16
Conventions• Scalars : x, y, z• Vector quantities :
Points: a, bVectors: Unit vectors:
• Matrices: M, Rx
Column vectors:• Functions:
Standard mathematical functions and custom functions: sin(θ)Functions follow the above conventions for scalar and vector quantities
• Norms: • Standard sets : • Algorithm descriptions are given in pseudocode based on standard C and C++• Advanced sections are marked with an asterisk
Graphics & Visualization: Principles & Algorithms Chapter 1 17
,v
1ˆ ˆ,e n
[0,1,2]=Tv
, ,a b Oa