![Page 1: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/1.jpg)
Advanced Computer Graphics Advanced Computer Graphics (Fall 2010) (Fall 2010)
CS 283, Lecture 7: Quadric Error Metrics
Ravi Ramamoorthi
http://inst.eecs.berkeley.edu/~cs283/fa10
![Page 2: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/2.jpg)
To Do To Do
Assignment 1, Due Oct 7. Should have made some serious progress by end of week
This lecture reviews quadric error metrics and some points regarding implementation
![Page 3: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/3.jpg)
ResourcesResources
Garland and Heckbert SIGGRAPH 97 paper
Garland website, implementation notes (in thesis)
Notes in this and previous lectures
![Page 4: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/4.jpg)
Surface Simplification: Goals (Garland)Surface Simplification: Goals (Garland)
Efficiency (70000 to 100 faces in 15s in 1997)
High quality, feature preserving (primary appearance emphasized rather than topology)
Generality, non-manifold models, collapse disjoint regions
![Page 5: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/5.jpg)
SimplificationsSimplifications
Pair contractions in addition to edge collapses
Previously connected regions may come together
![Page 6: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/6.jpg)
Algorithm OutlineAlgorithm Outline
![Page 7: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/7.jpg)
Quadric Error MetricsQuadric Error Metrics
Based on point-to-plane distance
Better quality than point-to-point
aa bb cc
ddaa
ddbb
ddcc
![Page 8: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/8.jpg)
Background: Computing PlanesBackground: Computing Planes
Each triangle in mesh has associated plane
For a triangle, find its (normalized) normal using cross products
Plane equation?
0ax by cz d+ + + =
0AB AC
n n v A vAB AC
´= - =
´
rr r r rg g
a
n b d A v
c
æö÷ç ÷ç ÷ç ÷= =-ç ÷ç ÷ç ÷÷çè ø
rr rg
![Page 9: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/9.jpg)
Quadric Error MetricsQuadric Error Metrics
Sum of squared distances from vertex to planes:
2
T
( , )
,
1
( , )
Dist
x a
y b
z c
d
Dist ax by cz d
D =
æö æö÷ ÷ç ç÷ ÷ç ç÷ ÷ç ç÷ ÷ç ç÷ ÷ç ç÷ ÷= =ç ç÷ ÷ç ç÷ ÷÷ ÷ç ç÷ ÷ç ç÷ ÷ç ç÷ ÷ç çè ø è ø
= + + + =
åv
p
v p
v p
v p p v
2
T
( , )
,
1
( , )
Dist
x a
y b
z c
d
Dist ax by cz d
D =
æö æö÷ ÷ç ç÷ ÷ç ç÷ ÷ç ç÷ ÷ç ç÷ ÷ç ç÷ ÷= =ç ç÷ ÷ç ç÷ ÷÷ ÷ç ç÷ ÷ç ç÷ ÷ç ç÷ ÷ç çè ø è ø
= + + + =
åv
p
v p
v p
v p p v
![Page 10: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/10.jpg)
Quadric Error MetricsQuadric Error Metrics
Common mathematical trick: quadratic form = symmetric matrix Q multiplied twice by a vector
T 2
T T
T T
T
( )D =
=
æ ö÷ç ÷= ç ÷ç ÷çè ø
=
å
å
å
p
p
p
p v
v pp v
v pp v
v Qv
T 2
T T
T T
T
( )D =
=
æ ö÷ç ÷= ç ÷ç ÷çè ø
=
å
å
å
p
p
p
p v
v pp v
v pp v
v Qv
![Page 11: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/11.jpg)
Quadric Error MetricsQuadric Error Metrics
Simply a 4x4 symmetric matrix
Storage efficient: 10 floating point numbers per vertex
Initially, error is 0 for all vertices
![Page 12: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/12.jpg)
Quadric Error MetricsQuadric Error Metrics
2nd degree polynomial in x, y and z
Level surface (vTQv = k) is a quadric surface Ellipsoid, paraboloid, hyperboloid, plane etc.
![Page 13: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/13.jpg)
![Page 14: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/14.jpg)
Quadric VisualizationQuadric Visualization
Ellipsoids: iso-error surfaces
Smaller ellipsoid = greater error for a given motion
Lower error for motion parallel to surface
Lower error in flat regions than at corners
Elongated in “cylindrical” regions
![Page 15: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/15.jpg)
Using QuadricsUsing Quadrics
Approximate error of edge collapses Each vertex v has associated quadric Q Error of collapsing v1 and v2 to v’ is v’TQ1v’+v’TQ2v’ Quadric for new vertex v’ is Q’=Q1+Q2
![Page 16: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/16.jpg)
Using QuadricsUsing Quadrics
Find optimal location v’ after collapse:
11 12 13 14
12 22 23 24
13 23 33 34
14 24 34 44
T
'
'
min ' ' ' : 0x y z
q q q q
q q q q
q q q q
q q q q
¶ ¶ ¶¶ ¶ ¶
é ùê úê úê ú= ê úê úê úê úë û
= = =v
Q
v Q v
11 12 13 14
12 22 23 24
13 23 33 34
14 24 34 44
T
'
'
min ' ' ' : 0x y z
q q q q
q q q q
q q q q
q q q q
¶ ¶ ¶¶ ¶ ¶
é ùê úê úê ú= ê úê úê úê úë û
= = =v
Q
v Q v
![Page 17: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/17.jpg)
Using QuadricsUsing Quadrics
Find optimal location v’ after collapse:
11 12 13 14
12 22 23 24
13 23 33 34
1
11 12 13 14
12 22 23 24
13 23 33 34
0
0'
0
0 0 0 1 1
0
0'
0
0 0 0 1 1
q q q q
q q q q
q q q q
q q q q
q q q q
q q q q
-
é ù éùê ú êúê ú êúê ú êú=ê ú êúê ú êúê ú êúë û ëû
é ù éùê ú êúê ú êúê ú êú= ê ú êúê ú êúê ú êúë û ëû
v
v
11 12 13 14
12 22 23 24
13 23 33 34
1
11 12 13 14
12 22 23 24
13 23 33 34
0
0'
0
0 0 0 1 1
0
0'
0
0 0 0 1 1
q q q q
q q q q
q q q q
q q q q
q q q q
q q q q
-
é ù éùê ú êúê ú êúê ú êú=ê ú êúê ú êúê ú êúë û ëû
é ù éùê ú êúê ú êúê ú êú= ê ú êúê ú êúê ú êúë û ëû
v
v
![Page 18: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/18.jpg)
Algorithm OutlineAlgorithm Outline
![Page 19: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/19.jpg)
Algorithm SummaryAlgorithm Summary
Compute the Q matrices for all the initial vertices
Select all valid pairs
Compute the optimal contraction target v vor each valid pair. The error vT(Q1+Q2)v of this target vertex becomes the cost of contracting that pair
Place all pairs in a heap keyed on cost with minimum cost pair on the top
Iteratively remove the least cost pair, contract this pair, and update the costs of all valid pairs of interest
![Page 20: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/20.jpg)
Final AlgorithmFinal Algorithm
![Page 21: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/21.jpg)
ResultsResults
OriginalOriginal
1k tris1k tris 100 tris100 tris
QuadricsQuadrics
![Page 22: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/22.jpg)
ResultsResults
OriginalOriginal
250 tris, edge collapses only250 tris, edge collapses only250 tris250 tris
QuadricsQuadrics
![Page 23: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/23.jpg)
Additional DetailsAdditional Details
Preserving boundaries/discontinuities (weight quadrics by appropriate penalty factors)
Preventing mesh inversion (flipping of orientation): compare normal of neighboring faces, before after
Has been modified for many other applications E.g. in silhouettes, want to make sure volume always
increases, never decreases Take color and texture into account (followup paper)
See paper, other more recent works for details
![Page 24: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/24.jpg)
Implementation TipsImplementation Tips
Incremental, test, debug, simple cases
Find good data structure for heap etc.
May help to visualize error quadrics if possible
Challenging, but hopefully rewarding assignment
![Page 25: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/25.jpg)
Questions?Questions?
Issues or questions?
All the material for assignment covered
Start early, work hard
Rest of unit NURBs (today if time permits) Subdivision (next lecture)
![Page 26: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/26.jpg)
OutlineOutline
Rational Splines
Quadratic rational splines
NURBs (briefly)
Parametric patches (briefly)
![Page 27: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/27.jpg)
Parametric Polynomial CurvesParametric Polynomial Curves
A parametric polynomial curve of order n:
Advantages of polynomial curves Easy to compute Infinitely differentiable everywhere
0
( )n
ii
i
x u a u=
=å0
( )n
ii
i
x u a u=
=å
0
( )n
ii
i
y u b u=
=å0
( )n
ii
i
y u b u=
=å
![Page 28: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/28.jpg)
Rational SplinesRational Splines
Can’t represent certain shapes (e.g. circles) with piecewise polynomials
Wider class of functions: rational functions Ratio of polynomials Can represent any quadric (e.g. circles) exactly
Mathematical trick: homogeneous coordinates Ratio of 2 polynomials in 3D equivalent to
single polynomial in 4D
![Page 29: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/29.jpg)
Rational SplinesRational Splines
Example: creating a circular arcwith 3 control points
(0,0)(0,0)
(0,1)(0,1) (1,1)(1,1)
Polynomial spline:Polynomial spline:parabolic arcparabolic arc
(0,0;1)(0,0;1)
(1,1;1)(1,1;1)
Rational spline:Rational spline:circular arccircular arc
(???)(???)
![Page 30: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/30.jpg)
Standard deCasteljauStandard deCasteljau
A B
(1 )t A tB
![Page 31: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/31.jpg)
Rational deCasteljauRational deCasteljau
A B
(1 )
(1 )A B
A B
t A t Bw w
t tw w
Aw Bw
![Page 32: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/32.jpg)
Homogeneous deCasteljauHomogeneous deCasteljau
(1 )
(1 )A B
A B
t A t Bw w
t tw w
Aw Bw
(1 )
(1 )A B
A B
t w A tw B
t w tw
A
A
w A
w
B
B
w B
w
Non-rational splines simply have all weights set to 1 instead
![Page 33: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/33.jpg)
OutlineOutline
Rational Splines
Quadratic rational splines
NURBs (briefly)
Parametric patches (briefly)
![Page 34: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/34.jpg)
Evaluation: Rational SplinesEvaluation: Rational Splines
Add an extra weight coordinate Multiply standard coords of control point by weight
(essentially the same as the use of homogeneous coords)
Apply standard deCasteljau or other evaluation alg.
Divide by final value of weight coordinateEssentially the same as perspective division/dehomogenize
Rational because of final division: Rational polynomial at the end (ratio of two polynomials)
![Page 35: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/35.jpg)
Quadratic Bezier CurveQuadratic Bezier Curve
Example: quarter-circle arc, weight midpoint Smaller w: pulled away from middle control point Larger w: pulled towards middle control point
(0,0;1)(0,0;1)
(0,1;1)(0,1;1) (1,1;1)(1,1;1)
Polynomial spline:Polynomial spline:parabolic arcparabolic arc
(0,0;1)(0,0;1)
(1,1;1)(1,1;1)
Rational spline:Rational spline:result depends on wresult depends on w
(0,1;w)(0,1;w)
![Page 36: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/36.jpg)
Quadratic Bezier CurveQuadratic Bezier Curve
General Bezier Formula for quadratic?
(0,0;1)(0,0;1)
(0,1;1)(0,1;1) (1,1;1)(1,1;1)
Polynomial spline:Polynomial spline:parabolic arcparabolic arc
(0,0;1)(0,0;1)
(1,1;1)(1,1;1)
Rational spline:Rational spline:result depends on wresult depends on w
(0,1;w)(0,1;w)
2 2 2 2
2 2 2 2
(1 ) 2 (1 ) (1 ) 2 (1 )
(1 ) 2 (1 ) (1 ) 2 (1 )A B c B
A B c B
t w A t t w B t w C t A t t w B t C
t w t t w t w t t t w t
![Page 37: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/37.jpg)
Dependence of curve on wDependence of curve on w
For w very large, curve pulled toward middle control point, get a section of a hyperbola
For w = 1 (standard spline), standard parabola
For w < 1, positive, curve moves away from middle control point
For w = 0, curve becomes a straight line
When is curve part of a circle? (homework)
2 2 2 2
2 2 2 2
(1 ) 2 (1 ) (1 ) 2 (1 )
(1 ) 2 (1 ) (1 ) 2 (1 )A B c B
A B c B
t w A t t w B t w C t A t t w B t C
t w t t w t w t t t w t
![Page 38: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/38.jpg)
Mid-Point (t = ½ ?)Mid-Point (t = ½ ?)2 2 2 2
2 2 2 2
(1 ) 2 (1 ) (1 ) 2 (1 )
(1 ) 2 (1 ) (1 ) 2 (1 )A B c B
A B c B
t w A t t w B t w C t A t t w B t C
t w t t w t w t t t w t
1 1 1 2
2 2(1 ) 2(1 )
wt
w w
![Page 39: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/39.jpg)
W very largeW very large2 2 2 2
2 2 2 2
(1 ) 2 (1 ) (1 ) 2 (1 )
(1 ) 2 (1 ) (1 ) 2 (1 )A B c B
A B c B
t w A t t w B t w C t A t t w B t C
t w t t w t w t t t w t
1 1 1 2
2 2(1 ) 2(1 )
wt
w w
(0,0;1)(0,0;1)
(0,1;>>1)(0,1;>>1) (1,1;1)(1,1;1)
![Page 40: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/40.jpg)
W = 1 (non-rational spline)W = 1 (non-rational spline)2 2 2 2
2 2 2 2
(1 ) 2 (1 ) (1 ) 2 (1 )
(1 ) 2 (1 ) (1 ) 2 (1 )A B c B
A B c B
t w A t t w B t w C t A t t w B t C
t w t t w t w t t t w t
1 1 1 2
2 2(1 ) 2(1 )
wt
w w
(0,0;1)(0,0;1)
(0,1;1)(0,1;1) (1,1;1)(1,1;1)
Polynomial spline:Polynomial spline:parabolic arcparabolic arc
![Page 41: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/41.jpg)
W < 1W < 12 2 2 2
2 2 2 2
(1 ) 2 (1 ) (1 ) 2 (1 )
(1 ) 2 (1 ) (1 ) 2 (1 )A B c B
A B c B
t w A t t w B t w C t A t t w B t C
t w t t w t w t t t w t
1 1 1 2
2 2(1 ) 2(1 )
wt
w w
(0,0;1)(0,0;1)
(1,1;1)(1,1;1)
Rational spline:Rational spline:result depends on wresult depends on w
(0,1;w)(0,1;w)
![Page 42: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/42.jpg)
W = 0W = 02 2 2 2
2 2 2 2
(1 ) 2 (1 ) (1 ) 2 (1 )
(1 ) 2 (1 ) (1 ) 2 (1 )A B c B
A B c B
t w A t t w B t w C t A t t w B t C
t w t t w t w t t t w t
1 1 1 2
2 2(1 ) 2(1 )
wt
w w
(0,0;1)(0,0;1)
(1,1;1)(1,1;1)
Straight LineStraight Line
(0,1;w)(0,1;w)
![Page 43: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/43.jpg)
OutlineOutline
Rational Splines
Quadratic rational splines
NURBs (briefly)
Parametric patches (briefly)
![Page 44: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/44.jpg)
NURBSNURBS
Non-uniform (vary time interval per segment)
Rational
B-Splines
Can model a wide class of curves and surfaces
Same convenient properties of B-Splines
Still widely used in CAD systems
![Page 45: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/45.jpg)
Polar Forms: Cubic Bspline CurvePolar Forms: Cubic Bspline Curve
-2 –1 0
–1 0 1 0 1 2
1 2 3
For Uniform B-splines, uniform knot vector (below)
For non-uniform, only require non-decreasing, not necessarily uniform (can be arbitrary)
Uniform knot vector:-2, -1, 0, 1, 2 ,3
Labels correspond to this
![Page 46: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/46.jpg)
NURBSNURBS
![Page 47: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/47.jpg)
OutlineOutline
Rational Splines
Quadratic rational splines
NURBs (briefly)
Parametric patches (briefly)
![Page 48: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/48.jpg)
Parametric PatchesParametric Patches
Each patch is defined by blending control points
FvDFH Figure 11.44FvDFH Figure 11.44
![Page 49: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/49.jpg)
Parametric PatchesParametric Patches
Point Q(u,v) on the patch is the tensor product of curves defined by the control points
Watt Figure 6.21Watt Figure 6.21
Q(u,v)Q(u,v)
Q(0,0)Q(0,0)
Q(1,0)Q(1,0)
Q(0,1)Q(0,1)Q(1,1)Q(1,1)
![Page 50: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/50.jpg)
Parametric Bicubic PatchesParametric Bicubic Patches
Point Q(u,v) defined by combining control points with polynomial blending functions:
1,1 1,2 1,3 1,4
2,1 2,2 2,3 2,4
3,1 3,2 3,3 3,4
4,1 4,2 4,3 4,4
( , )
P P P P
P P P PQ u v
P P P P
P P P P
T TUM M V
1,1 1,2 1,3 1,4
2,1 2,2 2,3 2,4
3,1 3,2 3,3 3,4
4,1 4,2 4,3 4,4
( , )
P P P P
P P P PQ u v
P P P P
P P P P
T TUM M V
Where M is a matrix describing the blending functionsWhere M is a matrix describing the blending functionsfor a parametric cubic curve (e.g., Bezier, B-spline, etc.)for a parametric cubic curve (e.g., Bezier, B-spline, etc.)
3 2 1u u uU 3 2 1u u uU
3 2 1v v vV 3 2 1v v vV
![Page 51: Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi cs283/fa10](https://reader035.vdocument.in/reader035/viewer/2022062322/56649ccd5503460f94997424/html5/thumbnails/51.jpg)
SummarySummary
Splines still used commonly for modeling
Start with simple spline curves (Bezier, uniform non-rational B-splines)
Discussed extension to rational curves (add homogeneous coordinate for rational polynomial)
Brief discussion of NURBs: widely used
Brief discussion of Parametric patches for modeling surfaces (rather than curves)