Computer Graphics Basics
What are some of the key concepts in computer graphics?
What is it?
Computer graphics is the computational creation and manipulation of visual data.
What is it good for?
- Understanding and interpreting information: Visualization is necessary for dealing with complex data.
- Improved communitcation with computers: Graphical and audio interfaces are helpful.
- Better product designs: Designers can explore more avenues in less time and can focus on the creative aspects of design (which do not include drafting).
- More economical designs: Design databases can be "tested" electronically, reducing dependence on complex and costly physical modes (e.g. aircraft).
- Better products: Design databases can be transmitted to robots for manufacturing (3-D output).
Where is the technology used?
- User Interfaces
- Hypermedia
- Presentation Graphics
- Electronic Publication
- Office Automation
- Computer Aided Design
- Architecture
- Engineering (VLSI, complex machienery)
- Visualization
- Chemical Analyses
- Demographic Studies
- Financial Planning
- Cartography
- Particle Behavior
- Medical (ultrasound, CT, MRI, PET)
- Meteorological Studies
- Photograph Enhancement
- Education
- Process Control
- Monitoring of power plants, computer networks,
airplane traffic, tornados
- Entertainment
- Feature Films
- Animated Programs
- Virtual Reality
- Arcade, Console, PC Games
- Simulation
- Factory Simulation
- Flight Simulators
- Graphic Arts
Subfields of Computer Graphics
It seems to me there are eight fundamental areas of computer
graphics. Obviously this is debatable, but this classification seems
to work.
- Mathematical Structures
- Spaces, points, vectors; dusts, curves,
surfaces, solids.
- Modeling
- Description of objects and their attributes,
including:
- Primitives (e.g. pixels, polygons)
- Intrinsic Geometry
- Attributes (e.g. color, texture)
- Connectivity (e.g. scene graphs)
- Dynamics (e.g. motion, morphing)
and techniques for object modeling, including:
- Polygon meshes
- Patches
- Solid Geometry
- Sweeps
- Fractals
- Particle systems
- L-grammars
- User Interfaces
- Human factors, I/O devices, color theory,
workstations, interactive techniques, dialog design, animation,
metaphors for object manipulation, virtual reality.
- Graphics Software
- Graphics APIs; paint, draw, CAD and
animation software; modeling and image databases;
iconic operating systems; software standards.
- Graphics Hardware
- I/O devices, specialized chips,
specialized architectures.
- Viewing
- Abstract to device coordinate
transformations, the syntehetic camera, windows, viewports,
clipping.
- Rendering
- Realism, physical modeling, ray tracing,
radiosity, visible surface determination, transparency,
translucency, reflection, refraction, shadows, shading,
surface and texture mapping.
- Image Processing
- Image description, image storage,
image transformations, image filtering, image enhancement,
pattern recognition, edge detection, object reconstruction.
Objects vs. Images
Objects are the (usually 3-D) conceptual entities that exist
in their own coordinate systems; images are the (usually
2-D) realizations of objects on some media.
To make images, we need to take into account
- The position and orientation of the viewer.
- The properties of the camera, such as its focal length
and aspect ratio.
- Properties of the materials.
- How the scene is lit.
To get an idea of what is involved in turning 3-D into 2-D, check out
this completely oversimplified view of projection.
We'll work out in class how to compute x' and y' from x, y, z, and d.
Graphics Systems
Input Devices
Physical: Keyboard, mouse, tablet, touch pad, touch screen,
data glove, camera, light pen, wand, joystick, joyswitch, trackball, spaceball,
microphone, speech recognizer, etc.
Logical: String, locator, pick, choice, valuator, stroke.
Output Devices
Examples: CRT display, LED display, LCD display, Plasma display,
printer, plotter, e-paper, hologram generator, film recorder, sound recorder, speaker,
robot arm, etc.
2-D output devices are either vector devices, which physically
draw line segments (like a plotter), or raster devices, which display
a grid of colored pixels (picture elements). The resolution of a
raster display is written as width × height. The ratio width ÷ height is
also noteworthy. Examples:
1.25 5:4 |
1.33 4:3 |
1.5 3:2 |
1.6 16:10 |
1.67 5:3 |
1.78 16:9 |
1.89 17:9 |
1280x1024 2560x2048
|
320x240QVGA 640x480VGA 768x576PAL 800x600SVGA 1024x768XGA 1152x864XVGA+ 1280x960 1400x1050SXGA+ 1440x1080 1600x1200UXGA 2048x1536QXGA
|
480x320iPhone<4 960x640iPhone4+ 1152x768 1280x854 1440x960
|
320x200 1280x800 1440x900 1680x1050 1920x1200 2560x1600
|
800x480 1280x768
|
854x480 1024x576 1280x720 1366x768 1600x900 1920x1080FullHD 2560x1440WQHD 3840x2160UHD-1 5120x28805K 7680x4320UHD-2
|
2048x10802K 4096x21604K 8192x43208K
|
Make sure to take a look at the amazing screen resolutions diagram from Wikipedia.
Note that the ratio of the number of pixel columns to the number of pixel rows (the SAR,
or storage apect ratio) may not be the same as the physical width of the display to the physical
height of the display (the DAR, or display aspect ratio). If they match, we have square pixels
— the PAR, or pixel aspect ratio will be 1:1. If not, the pixels will be stretched (which
may be ugly).
Exercise: A 15"×9" monitor is set to a display mode of 1280x1024 pixels. What is the pixel aspect ratio? Are the pixels short and fat or tall and skinny?
Frame Buffer
Memory that holds data for each pixel. May be separate buffers: color buffer,
depth buffer, stencil buffer, accumulation buffer.
Each buffer has a number of bits per pixel, called its depth.
Exercise: State how many bytes are required for buffers of the following resolution and depth: (a) 1920x1080, 24bpp, (b) 1024x768, 16bpp, (c) 1440x900, 32bpp.
Graphics APIs
Several styles:
- Programmatic:
- Pen plotter: moveTo, lineTo, penUp, penDown. Maybe angleLeft, angleRight,
push, pop.
- Pure raster: setPixel, getPixel.
- Vertex-based: begin, vertex, end, flush.
- Declarative (Retained mode):
Graphics Pipelines
You should know the basic idea behind pipelines in computing. If not, read
the Wikipedia
article, and its subarticles, too.
The OpenGL pipeline works roughly as follows:
See also the Wikipedia
article on graphics pipelines.