Computer and Information Science Computer Software Computer Software Chapter 1.2.
computer graphics15
-
Upload
shubham-kaushik -
Category
Documents
-
view
213 -
download
0
description
Transcript of computer graphics15
![Page 1: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/1.jpg)
MIT EECS 6.837, Durand and Cutler
Curves & Surfaces
![Page 2: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/2.jpg)
MIT EECS 6.837, Durand and Cutler
Schedule• Sunday October 5th, * 3-5 PM *
Review Session for Quiz 1
• Extra Office Hours on Monday
• Tuesday October 7th:Quiz 1: In class1 hand-written 8.5x11 sheet of notes allowed
• Wednesday October 15th:Assignment 4 (Grid Acceleration) due
![Page 3: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/3.jpg)
MIT EECS 6.837, Durand and Cutler
Last Time:• Acceleration Data Structures
![Page 4: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/4.jpg)
MIT EECS 6.837, Durand and Cutler
Questions?
![Page 5: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/5.jpg)
MIT EECS 6.837, Durand and Cutler
Today• Review• Motivation
– Limitations of Polygonal Models – Phong Normal Interpolation– Some Modeling Tools & Definitions
• Curves• Surfaces / Patches• Subdivision Surfaces• Procedural Texturing
![Page 6: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/6.jpg)
MIT EECS 6.837, Durand and Cutler
Limitations of Polygonal Meshes• planar facets• fixed resolution• deformation is difficult • no natural parameterization
![Page 7: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/7.jpg)
MIT EECS 6.837, Durand and Cutler
Can We Disguise the Facets?
![Page 8: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/8.jpg)
MIT EECS 6.837, Durand and Cutler
Phong Normal Interpolation• Not Phong Shading from
Assignment 3• Instead of using the normal
of the triangle, interpolate an averaged normal at each vertex across the face
• Must be renormalizedCourtesy of Leonard McMillan. Used with permission.
![Page 9: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/9.jpg)
MIT EECS 6.837, Durand and Cutler
10Kfacets
1Kfacets
1Ksmooth
10Ksmooth
![Page 10: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/10.jpg)
MIT EECS 6.837, Durand and Cutler
Better, but not always good enough• Still low resolution
(missing fine details)• Still have polygonal
silhouettes• Intersection depth is
planar• Collisions in a simulation• Solid Texturing• ...
![Page 11: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/11.jpg)
Some Non-Polygonal Modeling Tools
MIT EECS 6.837, Durand and Cutler
Extrusion
Spline Surfaces/Patches
Surface of Revolution
Quadrics and other implicit polynomials
![Page 12: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/12.jpg)
MIT EECS 6.837, Durand and Cutler
Continuity definitions:• C0 continuous
– curve/surface has no breaks/gaps/holes– "watertight"
• C1 continuous– curve/surface derivative is continuous– "looks smooth, no facets"
• C2 continuous– curve/surface 2nd derivative
is continuous– Actually important for shading
![Page 13: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/13.jpg)
MIT EECS 6.837, Durand and Cutler
Questions?
![Page 14: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/14.jpg)
MIT EECS 6.837, Durand and Cutler
Today• Review• Motivation• Curves
– What's a Spline?– Linear Interpolation– Interpolation Curves vs. Approximation Curves– Bézier– BSpline (NURBS)
• Surfaces / Patches• Subdivision Surfaces• Procedural Texturing
![Page 15: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/15.jpg)
MIT EECS 6.837, Durand and Cutler
Definition: What's a Spline?• Smooth curve defined by some control points• Moving the control points changes the curve
Interpolation Bézier (approximation)
BSpline(approximation)
Courtesy of Seth Teller. Used with permission.
![Page 16: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/16.jpg)
MIT EECS 6.837, Durand and Cutler
Interpolation Curves / Splines
www.abm.org Courtesy of The Antique Boat Museum. Used with permission.
![Page 17: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/17.jpg)
MIT EECS 6.837, Durand and Cutler
Linear Interpolation• Simplest "curve" between two points
![Page 18: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/18.jpg)
MIT EECS 6.837, Durand and Cutler
Interpolation Curves• Curve is constrained to pass through
all control points• Given points P0, P1, ... Pn, find lowest degree
polynomial which passes through the points
x(t) = an-1tn-1 + .... + a2t2 + a1t + a0y(t) = bn-1tn-1 + .... + b2t2 + b1t + b0
![Page 19: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/19.jpg)
Interpolation vs. Approximation Curves
MIT EECS 6.837, Durand and Cutler
Interpolationcurve must pass
through control points
Approximationcurve is influenced by control points
![Page 20: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/20.jpg)
Interpolation vs. Approximation Curves
MIT EECS 6.837, Durand and Cutler
• Interpolation Curve – over constrained →lots of (undesirable?) oscillations
• Approximation Curve – more reasonable?
![Page 21: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/21.jpg)
MIT EECS 6.837, Durand and Cutler
Cubic Bézier Curve• 4 control points• Curve passes through first & last control point• Curve is tangent at P0 to (P0-P1) and at P4 to (P4-P3)
![Page 22: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/22.jpg)
MIT EECS 6.837, Durand and Cutler
Cubic Bézier Curve• de Casteljau's algorithm for constructing Bézier
curves
t
t
tttt
![Page 23: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/23.jpg)
MIT EECS 6.837, Durand and Cutler
Cubic Bézier Curve
![Page 24: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/24.jpg)
MIT EECS 6.837, Durand and Cutler
Connecting Cubic Bézier Curves
• How can we guarantee C0 continuity (no gaps)?• How can we guarantee C1 continuity (tangent vectors match)?• Asymmetric: Curve goes through some control points but
misses others
![Page 25: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/25.jpg)
MIT EECS 6.837, Durand and Cutler
Higher-Order Bézier Curves• > 4 control points• Bernstein Polynomials as the basis functions
• Every control point affects the entire curve – Not simply a local effect – More difficult to control for modeling
Courtesy of Seth Teller. Used with permission.
![Page 26: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/26.jpg)
MIT EECS 6.837, Durand and Cutler
Cubic BSplines• ≥ 4 control points• Locally cubic• Curve is not constrained to pass through any
control points
Courtesy of Seth Teller. Used with permission.
![Page 27: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/27.jpg)
MIT EECS 6.837, Durand and Cutler
Cubic BSplines• Iterative method for constructing BSplines
Shirley, Fundamentals of Computer Graphics Courtesy of Seth Teller. Used with permission.
![Page 28: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/28.jpg)
MIT EECS 6.837, Durand and Cutler
Cubic BSplines
Courtesy of Seth Teller. Used with permission.
![Page 29: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/29.jpg)
MIT EECS 6.837, Durand and Cutler
Cubic BSplines• can be chained together• better control locally (windowing)
Courtesy of Seth Teller. Used with permission.
![Page 30: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/30.jpg)
MIT EECS 6.837, Durand and Cutler
Bézier is not the same as BSpline• Relationship to the control points is different
Bézier
BSpline
Courtesy of Seth Teller. Used with permission.
![Page 31: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/31.jpg)
MIT EECS 6.837, Durand and Cutler
Bezier is not the same as Bspline• But we can convert between the curves using the
basis functions:
![Page 32: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/32.jpg)
MIT EECS 6.837, Durand and Cutler
NURBS (generalized BSplines)• BSpline: uniform cubic BSpline
• NURBS: Non-Uniform Rational BSpline– non-uniform = different spacing between the
blending functions, a.k.a. knots– rational = ratio of polynomials (instead of cubic)
![Page 33: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/33.jpg)
MIT EECS 6.837, Durand and Cutler
Questions?
![Page 34: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/34.jpg)
MIT EECS 6.837, Durand and Cutler
Today• Review• Motivation• Spline Curves• Spline Surfaces / Patches
– Tensor Product– Bilinear Patches– Bezier Patches
• Subdivision Surfaces• Procedural Texturing
![Page 35: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/35.jpg)
MIT EECS 6.837, Durand and Cutler
Tensor Product• Of two vectors:
• Similarly, we can define a surface as the tensor product of two curves....Farin, Curves and Surfaces for
Computer Aided Geometric DesignFarin, Gerald. Curves and Surfaces for Computer-aided Geometric Design: A Practical Guide. Elsevier Science & Technology Books: Oct 2001, ISBN or UPC: 1-55860-737-4.
Image adapted from:
![Page 36: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/36.jpg)
MIT EECS 6.837, Durand and Cutler
Bilinear Patch
![Page 37: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/37.jpg)
MIT EECS 6.837, Durand and Cutler
Bilinear Patch• Smooth version of quadrilateral with
non-planar vertices...
– But will this help us model smooth surfaces?– Do we have control of the derivative at the
edges?
![Page 38: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/38.jpg)
MIT EECS 6.837, Durand and Cutler
Bicubic Bezier Patch
![Page 39: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/39.jpg)
MIT EECS 6.837, Durand and Cutler
Trimming Curves for Patches
Trimmed Spline
Basic SpineTrimming Pointsv
(u,v) = (0,0)
u
Image adapted from:Shirley, Peter. Fundamentals of Computer Graphics. A K Peters Limited. July 2002. ISBN: 1-56881-124-1.
![Page 40: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/40.jpg)
MIT EECS 6.837, Durand and Cutler
Questions?
![Page 41: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/41.jpg)
MIT EECS 6.837, Durand and Cutler
Today• Review• Motivation• Spline Curves• Spline Surfaces / Patches• Subdivision Surfaces• Procedural Texturing
![Page 42: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/42.jpg)
MIT EECS 6.837, Durand and Cutler
Chaikin's Algorithm
![Page 43: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/43.jpg)
MIT EECS 6.837, Durand and Cutler
Doo-Sabin Subdivision
![Page 44: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/44.jpg)
MIT EECS 6.837, Durand and Cutler
Doo-Sabin Subdivision
http://www.ke.ics.saitama-u.ac.jp/xuz/pic/doo-sabin.gifCourtesy of Zheng Xu. Used with permission.
![Page 45: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/45.jpg)
MIT EECS 6.837, Durand and Cutler
Loop Subdivision
p
c b
mm'
p'
Image adapted from:Shirley, Peter. Fundamentals of Computer Graphics. A K Peters Limited. July 2002. ISBN: 1-56881-124-1.
![Page 46: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/46.jpg)
MIT EECS 6.837, Durand and Cutler
Loop Subdivision• Some edges can be specified as crease edges
http://grail.cs.washington.edu/projects/subdivision/
Image removed due to copyright considerations.
![Page 47: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/47.jpg)
MIT EECS 6.837, Durand and Cutler
Weird Subdivision Surface Models
Justin LegakisCourtesy of Justin Legakis. Used with permission.
![Page 48: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/48.jpg)
MIT EECS 6.837, Durand and Cutler
Questions?
![Page 49: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/49.jpg)
MIT EECS 6.837, Durand and Cutler
Today• Review• Motivation• Spline Curves• Spline Surfaces / Patches• Procedural Texturing
![Page 50: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/50.jpg)
MIT EECS 6.837, Durand and Cutler
Procedural Textures
Image removed due to copyright considerations.
f (x,y,z) → color
![Page 51: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/51.jpg)
MIT EECS 6.837, Durand and Cutler
Procedural Solid Textures• Noise • Turbulence
Courtesy of Justin Legakis. Used with permission.
Image removed due to copyright considerations.
Image removed due to copyright considerations.
Courtesy of Justin Legakis. Used with permission.
![Page 52: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/52.jpg)
MIT EECS 6.837, Durand and Cutler
Questions?
![Page 53: computer graphics15](https://reader031.fdocuments.net/reader031/viewer/2022020420/568bdd531a28ab2034b5629e/html5/thumbnails/53.jpg)
MIT EECS 6.837, Durand and Cutler
Next Thursday:
Animation I:Keyframing