Documente Academic
Documente Profesional
Documente Cultură
Introduction
Topics
Introduction Applications Elementary Output Primitives Graphics Output Devices Graphics Input Devices Graphics Software Standards Interactive Computer Graphics
Introduction
What is Computer Graphics? History
Whirlwind Computer
1950, MIT Computer-driven CRT (Cathode Ray Tube) displays
DAC system
1964, GM Automobile design (CAD/CAM)
3
Introduction
History (contd)
Bitmap graphics
Apple and PC Bitmap:
A ones and zeros representation of the rectangular array of points on the screen. The points are called pixels or pels (picture elements).
GUIs
Applications
Art, entertainment, publishing Image processing Monitoring manufacturing processes Displaying simulation CAD Scientific analysis and visualization
Polyline
Line
Polyline of one line segment E.g., drawLine(x1, y1, x2, y2)
7
Polyline
Polyline
E.g., drawPolyline(poly), where poly is a list containing all endpoints Fig. 1.10
Polygon
Formed by connecting the first and last points of a polyline Simple polygon: no two edges cross Convex polygon Concave polygon Fig 1.11
Attributes of Polyline
Thickness Color Style
Curves
Circle Ellipse Parabola Hyperbola B-spline NURBS
Attributes?
10
Text
Character string Shape defined by (Fig. 1.16)
11
Raster Image
Image made up of pixels (Fig. 1.19) Stored as a 2D array of numerical values (Fig. 1.20)
Bit map: 1 bit per pixel Pixel map: >1 bits per pixel
Formats
pbm ppm
13
Pixel depth:
#bits needed to represent the gray level of a pixel 1 bit: bi-level, black-and-white, monochrome (Fig 1.26) 2 bits: 4 gray levels 4 bits: 16 gray levels : 8 bits: 256 gray levels
14
Color value
Ordered triple (r, g, b) representing intensities of red, green, blue, respectively
Color depth:
#bits used to represent the color of a pixel E.g., color depth = 3 (0,0,0) = black, (1,1,1) = white (0,0,1) = blue, (1,0,0) = red, (1,0,1) = ? Q: how many colors can be represented?
15
16
Vector
Raster
Display
Hard-copy
17
Vector Display
Electron beam deflected from endpoint to endpoint One line at a time, similar to pen plotter Dictated by display commands Random Scan, refresh required Display processor must cycle through display list to refresh CRT's phosphor at least 60 times per second (60Hz) to avoid flicker. Image changed by changing display commands in the list 18
Frame buffer
A region of memory to hold all of the pixel values for the display surface Where is it in a computer?
19
One line at a time, from left to right From top to bottom Back to top (refresh, required for CRT monitor)
Refresh rate must be >60 times per second to prevent flicker
20
Raster is stored as a matrix of pixels representing entire screen area Memory issue Sequential scan and refresh
21
22
Three beams, RED, GREEN, and BLUE, are controlled Two types
True color display system Indexed color display system
23
Raster Displays
Advantages
Lower cost Ability to display filled area
Disadvantages
Discrete nature of pixel presentation Aliasing: Jaggies or staircasing caused by approximation
24
25
26
Pixel value used as an index into LUT Programmable Palette: set of possible colors can be displayed
Indexed color displays with LUT is much cheaper than true color systems!!
28
Plotter
Flatbed plotter Drum plotter
29
30
Which physical input devices are suitable for a particular logical input device?
31
Core
3D Core graphics System Produced by an ACM SIGGRAPH committee
GKS
Graphics Kernel System 2D GKS-3D, 1988 Groups of primitives arranged as segments, but not nested
32
PHIGS
1988 (Programmers Hierarchical Interactive Graphics System) Nested structures Structure databases PHIGS PLUS: includes shading and lighting Complicated, large
de facto Standards:
PEX (PHIGS Extension to X) PostScript OpenGL
33
Framework
34
35