What is it?
Computer graphics is the computational creation and manipulation of visual data.
4/24/2014
Arcade, Console, PC Games Simulation Factory Simulation Flight Simulators Graphic Arts Video Painting, etc.
4/24/2014
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.
http://cs.lmu.edu/~ray/notes/graphicsintro/ 3/5
4/24/2014
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 480x320 (iPhone<4) 960x640 (iPhone4+) 1152x768 1280x854 1440x960 1.6 16:10 1.67 5:3 1.78 16:9 854x480 1280x720 (HD 720) 1366x768 1920x1080 (HD 1080) 1.89 17:9 2048x1080 (2K) 4096x2160 (4K)
1280x1024 320x240 2560x2048 640x480 (VGA) 768x576 800x600 (SVGA) 1024x768 (XGA) 1280x960 1400x1050 1600x1200 (UXGA) 2048x1536 (QXGA)
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):
http://cs.lmu.edu/~ray/notes/graphicsintro/ 4/5
4/24/2014
Scene Graph
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:
http://cs.lmu.edu/~ray/notes/graphicsintro/
5/5