Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction...
Transcript of Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction...
![Page 1: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/1.jpg)
Introduction to Computer Graphics
Ed AngelProfessor of Computer Science,
Electrical and Computer Engineering, and Media Arts
Director, Arts Technology CenterUniversity of New Mexico
![Page 2: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/2.jpg)
2Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Contact Information
[email protected]/~angel/CS433
CS Office FEC 301F277-6560
Office Hours: TTh PMArts Technology Center
1923 Las Lomas277-2286
![Page 3: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/3.jpg)
3Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Objectives
•Broad introduction to Computer Graphics Software Hardware Applications
•Top-down approach•OpenGL
![Page 4: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/4.jpg)
4Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Text Book
• Ed Angel, Interactive Computer Graphics, A Top-down Approach with OpenGL (Third Edition)
• The lectures cover the material in Chapters 1-10
![Page 5: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/5.jpg)
5Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Prerequisites
•Good programming skills in C (or C++)•Basic Data Structures
Linked lists Arrays
•Geometry•Simple Linear Algebra
![Page 6: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/6.jpg)
6Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Requirements
• 3 Assigned Projects Simple Interactive 3D
•Term Project You pick
![Page 7: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/7.jpg)
7Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Resources
•Can run OpenGL on any system Windows Linux Mac
•CS lab Linux/mesa Scalable systems lab
• Intellestations Gforce 3 and FX
![Page 8: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/8.jpg)
8Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
References
•Other helpful references OpenGL: A Primer, Ed Angel, Addison-Wesley,
2002• Designed for students who need more programming
information
The OpenGL Programmer’s Guide (the Redbook) and the OpenGL Reference Manual (The Blue book), Addison-Wesley,
– The definitive references
![Page 9: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/9.jpg)
9Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Web Resources
•www.opengl.org•www.cs.unm.edu/~angel
![Page 10: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/10.jpg)
10Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Outline: Part 1
•Part 1: Introduction•Text: Chapter 1•Lectures 1-3
What is Computer Graphics? Applications Areas History Image formation Basic Architecture
![Page 11: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/11.jpg)
11Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Outline: Part 2
•Part 2: Basic OpenGL•Text: Chapters 2-3•Lectures 4-9
Architecture GLUT Simple programs in two and three dimensions Interaction
![Page 12: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/12.jpg)
12Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Outline: Part 3
•Part 3: Three-Dimensional Graphics•Text: Chapters 4-6•Lectures 10-20
Geometry Transformations Homogeneous Coordinates Viewing Shading
![Page 13: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/13.jpg)
13Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Outline: Part 4
•Part 4: Discrete Methods•Text: Chapter 7•Lectures 21-24
Buffers Bitmaps and Pixel Maps Texture Mapping Compositing and Transparency
![Page 14: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/14.jpg)
14Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Outline: Part 5
•Part 5: Implementation•Text: Chapter 8•Lectures: 25-28
Approaches (object vs image space) Implementing the pipeline Clipping Line drawing Polygon Fill Display issues (color)
![Page 15: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/15.jpg)
15Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Outline: Part 6
•Part 6: Hierarchy•Text: Chapter 9•Lectures: 29-31
Tree Structured Models Traversal Methods Scene Graphs
![Page 16: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/16.jpg)
16Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Outline: Part 7
•Part 7: Curves and Surfaces•Text: Chapter 10•Lectures: 32-36
![Page 17: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/17.jpg)
17Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
What is Computer Graphics
•Now we start to explore what computer graphics is about and survey some application areas
•But we start with a historical introduction
![Page 18: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/18.jpg)
18Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Computer Graphics
•Computer graphics deals with all aspects of creating images with a computer
Hardware Software Applications
![Page 19: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/19.jpg)
19Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Example
•Where did this image come from?
•What hardware/software did we need to produce it?
![Page 20: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/20.jpg)
20Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Preliminary Answer
•Application: The object is an artist’s rendition of the sun for an animation to be shown in a domed environment (planetarium)
•Software: Maya for modeling and rendering but Maya is built on top of OpenGL
•Hardware: PC with graphics card for modeling and rendering
![Page 21: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/21.jpg)
21Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Basic Graphics System
Input devices
Output device
Image formed in FB
![Page 22: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/22.jpg)
22Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
CRT
Can be used either as a line-drawing device (calligraphic) or to display contents of frame buffer (raster mode)
![Page 23: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/23.jpg)
23Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Computer Graphics: 1950-1960
•Computer graphics goes back to the earliest days of computing
Strip charts Pen plotters Simple displays using A/D converters to go
from computer to calligraphic CRT
•Cost of refresh for CRT too high Computers slow, expensive, unreliable
![Page 24: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/24.jpg)
24Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Computer Graphics: 1960-1970
•Wireframe graphics Draw only lines
•Project Sketchpad•Display Processors•Storage tube
wireframe representationof sun object
![Page 25: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/25.jpg)
25Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Project Sketchpad
• Ivan Sutherland’s PhD thesis at MIT Recognized the potential of man-machine
interaction Loop
• Display something• User moves light pen• Computer generates new display
Sutherland also created many of the now common algorithms for computer graphics
![Page 26: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/26.jpg)
26Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Display Processor
• Rather than have host computer try to refresh display use a special purpose computer called a display processor (DPU)
• Graphics stored in display list (display file) on display processor
• Host compiles display list and sends to DPU
![Page 27: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/27.jpg)
27Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Direct View Storage Tube
•Created by Tektronix Did not require constant refresh Standard interface to computers
• Allowed for standard software• Plot3D in Fortran
Relatively inexpensive• Opened door to use of computer graphics for CAD
community
![Page 28: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/28.jpg)
28Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Computer Graphics: 1970-1980
•Raster Graphics•Beginning of graphics standards
IFIPS• GKS: European effort
– Becomes ISO 2D standard• Core: North American effort
– 3D but fails to become ISO standard
•Workstations and PCs
![Page 29: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/29.jpg)
29Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Raster Graphics
• Image produced as an array (the raster) of picture elements (pixels) in the frame buffer
![Page 30: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/30.jpg)
30Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Raster Graphics
•Allows us to go from lines and wire frame images to filled polygons
![Page 31: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/31.jpg)
31Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
PCs and Workstations
•Although we no longer make the distinction between workstations and PCs, historically they evolved from different roots
Early workstations characterized by• Networked connection: client-server model• High-level of interactivity
Early PCs included frame buffer as part of user memory
• Easy to change contents and create images
![Page 32: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/32.jpg)
32Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Computer Graphics: 1980-1990
Realism comes to computer graphics
smooth shading environmentalmapping
bump mapping
![Page 33: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/33.jpg)
33Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Computer Graphics: 1980-1990
•Special purpose hardware Silicon Graphics geometry engine
• VLSI implementation of graphics pipline
• Industry-based standards PHIGS RenderMan
•Networked graphics: X Window System•Human-Computer Interface (HCI)
![Page 34: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/34.jpg)
34Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Computer Graphics: 1990-2000
•OpenGL API•Completely computer-generated feature-length movies (Toy Story) are successful
•New hardware capabilities Texture mapping Blending Accumulation, stencil buffers
![Page 35: Introduction to Computer Graphics - University of …angel/CS433.03/LECTURES/CS... · Introduction to Computer Graphics ... Top-down Approach with OpenGL (Third Edition) ... •Good](https://reader031.fdocuments.in/reader031/viewer/2022022016/5b77b3ac7f8b9a515a8d9de7/html5/thumbnails/35.jpg)
35Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002
Computer Graphics: 2000-
•Photorealism•Graphics cards for PCs dominate market
Nvidia, ATI, 3DLabs
•Game boxes and game players determine direction of market
•Computer graphics routine in movie industry: Maya, Lightwave