Beruflich Dokumente
Kultur Dokumente
837
Introduction to Computer
Graphics
Plan
• Introduction
• Administrivia
• Course secretary
– Bryt Bradley
Overview 3
Why Computer Graphics?
• Movies
• Games
• CAD-CAM
• Simulation
• Virtual reality
• Visualization
• Medical imaging
Overview 4
What you will learn in 6.837
• Fundamentals of computer graphics algorithms
• Able to implement most applications just shown
• Understand how graphics APIs and the graphics
hardware work
Overview 5
What you will NOT learn
• Software packages
– CAD-CAM
– Photoshop and other painting tools
• Artistic skills
• Game design
• Graphics API
– Although you will be exposed to OpenGL
Overview 6
Plan
• Introduction
• Administrivia
Overview 8
Ray Casting
• For every pixel
construct a ray from the eye
– For every object in the scene
• Find intersection with the ray
• Keep if closest
Overview 9
Ray Casting
• For every pixel
construct a ray from the eye
– For every object in the scene
• Find intersection with the ray
• Keep if closest
Overview 10
Ray Tracing
• Shade (interaction of light and material)
• Secondary rays (shadows, reflection, refraction
Overview 11
Ray Tracing
• Original Ray-traced
image by Whitted
Image removed due to copyright considerations.
• Environment map by
Paul Debevec
Overview 12
Overview of the semester
• Ray Tracing
– Quiz 1
• Animation, modeling, IBMR
– Choice of final project
• Rendering pipeline
– Quiz 2
• Advanced topics
Overview 13
Animation: Keyframing
Overview 15
Rigid body dynamics
• Simulate all external forces and torques
f1 (t ) f2 (t )
x (t ) pb2 (t )
p1b (t )
v (t )
pb3 (t )
f3 (t ) Overview 16
Modeling
• Curved surfaces
• Subdivision surfaces
Overview 17
Image-based Rendering
• Use images as inputs and representation
• E.g. Image-based modeling and photo editing
Boh, Chen, Dorsey and Durand 2001
Overview 18
Overview of the semester
• Ray Tracing
– Quiz 1
• Animation, modeling, IBMR
– Choice of final project
• Rendering pipeline
– Quiz 2
• Advanced topics
Overview 19
The Rendering Pipeline
Ray Casting Rendering Pipeline
• For each pixel • For each triangle
– For each object – For each projected pixel
Overview 20
The Rendering Pipeline
• Transformations
FAR
y
-n NEAR x
z x
z o
y
EYE
o x z o
• Clipping
• Rasterization
Courtesy of Leonard McMillan, Computer Science at the University
of North Carolina in Chapel Hill. Used with permission
• Visibility
Overview 21
Overview of the semester
• Ray Tracing
– Quiz 1
• Animation, modeling, IBMR
– Choice of final project
• Rendering pipeline
– Quiz 2
• Advanced topics
Overview 22
Textures and shading
Overview 24
Traditional Ray Tracing
Overview 25
Ray Tracing+soft shadows
Overview 26
Ray Tracing+caustics
Overview 27
Global Illumination
Overview 28
Antialiasing
Overview 29
Courtesy of Leonard McMillan, Computer Science at the University of North Carolina in Chapel Hill. Used with permission.
Questions?
Overview 30
Plan
• Introduction
• Administrivia
Overview 32
Prerequisites
• Not enforced
• 18.06 Linear Algebra
– Simple linear algebra, vectors, matrices, basis, solving
systems of equations, inversion
• 6.046J Algorithms
– Orders of growth, bounds, sorting, trees
• C++
– All assignments are in C++
– Review/introductory session Monday
Overview 33
Grading policy
• Assignments: 40%
– Must be completed individually
– No late policy. Stamped by stellar.
• 2 Quizzes: 20%
– 1 hour in class
• Final project: 40%
– Groups of 3, single grade for the group
– Initial proposal: 3-5 pages
– Steady weekly progress
– Final report & presentation
– Overall technical merit
Overview 34
Assignments
• Turn in code AND executable
• We will watch code style
• Platform
– Windows
– Linux
• Collaboration policy:
– You can chat, but code on your own
• No late policy
Overview 35
Project
• Groups of 3
• Brainstorming
– Middle of the semester
• Proposal
• Weekly meeting with TAs
• Report & presentation
Overview 36
Plan
• Introduction
• Administrivia
A = ∪ f i ( A)
Image removed due to copyright considerations.
Overview 39
Rendering
For a number of random input points (x0, y0)
For j=0 to big number
Pick transformation i
(xk+1, yk+1) = fi (xk, yk)
Display (xk, yk)
Overview 40
Example: Sierpinsky triangle
For a number of random input points (x0, y0)
For j=0 to big number
Pick transformation i
(xk+1, yk+1) = fi (xk, yk)
Display (xk, yk)
Overview 41
Example: Sierpinsky triangle
For a number of random input points (x0, y0)
For j=0 to big number
Pick transformation i
(xk+1, yk+1) = fi (xk, yk)
Display (xk, yk)
Overview 42
Example: Sierpinsky triangle
For a number of random input points (x0, y0)
For j=0 to big number
Pick transformation i
(xk+1, yk+1) = fi (xk, yk)
Display (xk, yk)
Overview 43
Example: Sierpinsky triangle
For a number of random input points (x0, y0)
For j=0 to big number
Pick transformation i
(xk+1, yk+1) = fi (xk, yk)
Display (xk, yk)
Overview 44
Example: Sierpinsky triangle
For a number of random input points (x0, y0)
For j=0 to big number
Pick transformation i
(xk+1, yk+1) = fi (xk, yk)
Display (xk, yk)
Overview 45
Example: Sierpinsky triangle
For a number of random input points (x0, y0)
For j=0 to big number
Pick transformation i
(xk+1, yk+1) = fi (xk, yk)
Display (xk, yk)
Overview 46
Example: Sierpinsky triangle
For a number of random input points (x0, y0)
For j=0 to big number
Pick transformation i
(xk+1, yk+1) = fi (xk, yk)
Display (xk, yk)
Overview 47
Example: Sierpinsky triangle
For a number of random input points (x0, y0)
For j=0 to big number
Pick transformation i
(xk+1, yk+1) = fi (xk, yk)
Display (xk, yk)
Overview 48
Example: Sierpinsky triangle
For a number of random input points (x0, y0)
For j=0 to big number
Pick transformation i
(xk+1, yk+1) = fi (xk, yk)
Display (xk, yk)
Overview 49
Example: Sierpinsky triangle
For a number of random input points (x0, y0)
For j=0 to big number
Pick transformation i
(xk+1, yk+1) = fi (xk, yk)
Display (xk, yk)
Overview 50
Example: Sierpinsky triangle
For a number of random input points (x0, y0)
For j=0 to big number
Pick transformation i
(xk+1, yk+1) = fi (xk, yk)
Display (xk, yk)
Overview 51
Example: Sierpinsky triangle
For a number of random input points (x0, y0)
For j=0 to big number
Pick transformation i
(xk+1, yk+1) = fi (xk, yk)
Display (xk, yk)
Overview 52
Example: Sierpinsky triangle
For a number of random input points (x0, y0)
For j=0 to big number
Pick transformation i
(xk+1, yk+1) = fi (xk, yk)
Display (xk, yk)
Overview 53
Example: Sierpinsky triangle
For a number of random input points (x0, y0)
For j=0 to big number
Pick transformation i
(xk+1, yk+1) = fi (xk, yk)
Display (xk, yk)
Overview 54
Example: Sierpinsky triangle
For a number of random input points (x0, y0)
For j=0 to big number
Pick transformation i
(xk+1, yk+1) = fi (xk, yk)
Display (xk, yk)
Overview 55
Example: Sierpinsky triangle
For a number of random input points (x0, y0)
For j=0 to big number
Pick transformation i
(xk+1, yk+1) = fi (xk, yk)
Display (xk, yk)
Overview 56
Example: Sierpinsky triangle
For a number of random input points (x0, y0)
For j=0 to big number
Pick transformation i
(xk+1, yk+1) = fi (xk, yk)
Display (xk, yk)
Overview 57
Example: Sierpinsky triangle
For a number of random input points (x0, y0)
For j=0 to big number
Pick transformation i
(xk+1, yk+1) = fi (xk, yk)
Display (xk, yk)
Overview 58
Example: Sierpinsky triangle
For a number of random input points (x0, y0)
For j=0 to big number
Pick transformation i
(xk+1, yk+1) = fi (xk, yk)
Display (xk, yk)
Overview 59
Example: Sierpinsky triangle
For a number of random input points (x0, y0)
For j=0 to big number
Pick transformation i
(xk+1, yk+1) = fi (xk, yk)
Display (xk, yk)
Overview 60
Other IFS
• The Dragon
Overview 61
Application: fractal compression
• Exploit the self-similarity in an image
• E.g. http://fractales.inria.fr/index.php?page=img_compression
Overview 62
Assignment: IFS
• Write a C++ IFS class
• Get familiar with
– vector and matrix library
– Image library
• Due Wednesday at 11:59pm
Overview 63
Review/introduction session: C++
• Monday 7:30-9
Overview 64
Questions?
Overview 65