Title: Interactive Computer Graphics
1Interactive Computer Graphics
- Instructor Amin Hammad
- E-mail hammad_at_cmu.edu
- URL hammad.ce.cmu.edu
- Office Hours Room 747
- Monday 900-1100 (or by
appointment)
2Administrivia of Course
- Website (hammad.ce.cmu.edu)
- TA Cholyeun Hongpisanwiwat
- cholyeun_at_sis.pitt.edu
- Office Hours Monday 900-1100 (or by
appointment) - Book Interactive Computer Graphics (Edward
Angel) - Collaboration Policy
- Grading Assignments (45) Tests (40)
- Quizzes (15)
- Difficulty/Time required
- Programming environment (mainly Visual C)
- Questions
3What is Computer Graphics
- Anything to do with visual representations on a
computer including - Text (e.g. Japanese characters )
- GUIs
- Computer Images
- 3D Graphics CG special effects games
animations - Scientific Visualization
- Algorithms theory (physics math computation)
- Display devices hardware (graphics cards
monitors)
4Course Outline
- Graphics Systems and Models
- Graphics Programming
- Input and Interaction
- Geometric Objects and Transformation
- Viewing
- Shading
- Advanced Topics (Object-oriented graphics
texture mapping curves etc.)
5Contents
- General Overview History and applications of CG
- Graphics Systems
- Colors Perception
- Computer Colors RGB and HSL
- OpenGL Introduction
- Some CG demos.
Reading Angel 1 2.4
6Historical Background Sketchpad
- Ivan Sutherland 1963 MIT
- Sketchpad A man machine
- Graphical communications system
- (first interactive graphics thesis
- included many GUI concepts)
- Inspired many early graphics researchers
- Sutherland also pioneered VR and hidden surface
problems - 1988 Turing award for his pioneering and
visionary contributions to computer graphics
starting with sketchpad
7From Text to GUIs
- Xerox Star First workstation with GUI
- Invented at PARC in 1975. Used in the Apple
Macintosh and now MS Windows.
Xerox Star
Windows 1.0
8Graphical applications
- Presentations (bar charts graphs Powerpoint)
- Scientific Visualization
Compressible flow around Space shuttle science.gmu
.edu
93D Graphics
- Maybe what we generally consider CG
- Currently important in
- Design (CAD)
- Education Simulators VR
- Games
- Entertainment (Movies) Art
10Landscape simulation of Los Angeles (UCLA)
11Effects needed for Realism
- Shadows
- Reflections (Mirrors)
- Transparency
- Detail (Textures etc.)
- Complex Illumination
- Realistic Materials
The light of Mies van der Rohe Modeling Stephen
Duck Rendering Henrik Wann Jensen
12Photorealistic Rendering
13Interactive CG Systems
Input Devices
Cathode Ray Tube (CRT) Liquid Crystal Display
(LCD)
14Cathode Ray Tube (CRT)
Electron Gun
Phosphor Field
15Cathode Ray Tube (CRT)
Electron Gun
Phosphor Field
Deflectors
16Phosphors Decay
- Light coming from a single phosphor does not last
long. - Human eye can detect a difference within 20
milliseconds
- To appear without flicker the entire screen
should be redrawn (Refreshed) at least 50 times
per second (50 Hz)
17The Frame Buffer
- Phosphors are logically arranged into a 2D array
of pixture elements (pixels)
- The Frame Buffer stores the array of pixels that
are to be activated when the display is refreshed
- Resolution of Frame Buffer denotes the size of
the array e.g. 1280 x 1024
18Frame Buffer
Monochrome System
Display
000000000000000000000000
000000000000000000000000
000000000000000000000000
000000000000000000000000
000011000011000000000000
000011000011000000000000
000000000000000000000000
000000000000000000000000
001000000000001000000000
000100000000010000000000
000010000000100000000000
000001111111000000000000
000000000000000000000000
000000000000000000000000
000000000000000000000000
000000000000000000000000
000000000000000000000000
19Interlacing
- Because phosphors are small it is difficult for
the eye to distinguish from one phosphor to the
next.
- Interlacing To refresh every other row of the
display within 50Hz.
20Colors in the Frame Buffer
- Depth refers to how many bits represent each
pixel. - Adding bits allows the frame buffer to store not
only if a pixel is active but also what color it
should be - 8 bits 256 colors
21Color CRT
Deflectors
Phosphor Field
22Color Displays
- Color code is stored in the frame buffer
- Display translates color code into intensities
for three electron guns. - Each gun fires into an appropriately colored
phosphor in a group of three (known as a triad). - Triad Pixel
23 Color Spectrum
Our sense of color is derived from a
physiological response to lightwaves in the
visible electromagnetic spectrum
24Color Blending
- Light that we see is made up of photons moving at
varying wavelengths
- A Color is actually defined by continuous
function C() across all wavelengths of the
visible spectrum
25Human Visual System
- Retina is comprised of Rod cells and 3 types of
Cone cells
Iris
- Each type of the Cones responds best to a
particular wavelength.
26Sensitivity of Cones
27Tri-color Model
- The eye breaks down incoming light into a triplet
of values (RGB). - The brain converts that triplet back into a
single (perceived) color
- Instead of representing color as a continuous
function we can simplify our representation to a
triplet of Red Green Blue intensities.
28RGB Color Cube
29RGB Color Cube
30RGB Color Cube
What does this line represent
31Alternative Color Model HSL
- Hue A specific color (usually selected on a
continuum) - Saturation How much is the dominant wavelength
distinguished from the other colors (How much
white has been added) - Lightness How bright does the color appear.
32Understanding HSL
What is the darkest color possible
Black
What is the lightest color possible
White
What is the color if Saturation 0
Gray
What is the color if Saturation 1
Pure Color
33HSL Cones
White
Black
34HSL Cones
White
Grayscale
Black
35HSL Cones
Pure Color
36Color Coding
- Full spectrum can be specified using 3 numbers.
(RGB or HSL) - These values can be coded into a single number
and stored in the frame buffer
37The Pinhole Camera and Synthetic Camera Models
Image plane
Pinhole
- An ideal pinhole camera has an infinite depth of
field (all points are in focus) - The angle of view the angle made by the
largest object that the camera can image on
its film plane.
Illustration courtesy Greg Humphries
38Ray Tracing
- Arbitrary paths realism
- Trace from light
- Most light rays dont hit eye
- Eye Ray tracing
- Primary Rays
- Shadow Rays
- Reflected/Transmitted Rays
Appel 68
39Pipeline Architecture for Graphics APIs
(Application Programmers Interface)
Frame Buffer
Numeric Data
Clipper
Rasterizer
Projector
Transformer
Graphics Renderer
Numeric Data Mathematical Representations of
graphical shapes. Often in terms of vertices and
lines.
40Pipeline Architecture for Graphics APIs
Frame Buffer
Numeric Data
Clipper
Rasterizer
Projector
Transformer
Transformer Mathematical operations are
performed on the data to handle movement and
positioning of the graphical representation
41Pipeline Architecture for Graphics APIs
Frame Buffer
Numeric Data
Clipper
Rasterizer
Projector
Transformer
Clipper Limits the size of the dataset to
contain only information that should be displayed
for a given point-of-view
42Pipeline Architecture for Graphics APIs
Frame Buffer
Numeric Data
Clipper
Rasterizer
Projector
Transformer
Projector Until this stage our numeric
representation has been dealing with a 3D model.
This stage reduces the dataset to 2D
43Pipeline Architecture for Graphics APIs
Frame Buffer
Numeric Data
Clipper
Rasterizer
Projector
Transformer
Rasterizer The processed numeric information is
finally converted into individual pixels
44Pipeline Architecture for Graphics APIs
Frame Buffer
Numeric Data
Clipper
Rasterizer
Projector
Transformer
Frame Buffer Pixels are sent to the Frame
Buffer to be displayed at the next refresh.
45OpenGL
- OpenGL is a graphics API
- Software interface to graphics hardware
- Hardware independent
- No windowing or high-level tasks
- Higher level API utilities available (GLU)
- Application -gt Higher level -gt OpenGL -gt Hardware
- Window system separate (GLUT Motif etc.)
- Benefits
- Fast standard portable window-system
independent - Other APIs
- GKS(Graphical Kernel System)
- PHIGS (Programmers Hierarchical Interactive
Graphics System)
46GL Related APIs
- GL implements the Graphics Renderer using
pipeline architecture - GLU (Utilities) provides some higher level
interfaces for projections and viewing - GLUT (Utility toolkit) provides window
management and event handling
4710 minutes break
48Geographic Information System
- A system for processing digital thematic maps
- representing geographic features and their
attributes.
49Proposed Designs for a New Park
50Case Study Area
51Maps of Buildings Roads etc.
52Add Buildings Heights
53Add CAD Representation of the New Project
54Automatically Add Image Mapping
I4
I3
Building layer (polygon) Attribute height LU
image etc.
I2
Image Layer (line) Attribute Base-height
height etc.
I1
I1
55(No Transcript)
56Reality-Virtuality Continuum
(After Paul Milgram and Fumio Kishino).
57Optical see-through HMD
Graphic Images
Head Tracker
Head Locations
Scene Generator
Monitors
Real World
Optical Combiners
58Laser printer maintenance application
(Courtesy Steve Feiner Blair MacIntyre and
Dorée Seligmann Columbia University.)
59Virtual fetus inside womb of pregnant patient
(Courtesy UNC Chapel Hill Dept. of Computer
Science.)
60Simulation of London Millennium Bridge
(Courtesy Insitut Graphische Datenverarbeitung)
61Video and Graphics Mixing