Download presentation
Presentation is loading. Please wait.
Published byJohnathan Willis Chase Modified over 9 years ago
1
CS559: Computer Graphics Lecture 19: Curves Li Zhang Spring 2008
2
Today Continue on curve modeling Reading – Shirley: Ch 15.1 – 15.5
3
More control points p0 p1 p2 By solving a matrix equation that satisfies the constraints, we can get polynomial coefficients
4
Two views on polynomial curves From control points p, we can compute coefficients a Each point on the curve is a linear blending of the control points
5
What are b0(t), b1(t), …? Two control point case: b 0 (t) b 1 (t)
6
What are b0, b1, …? Three control point case: Which is b 0 (t)?
7
What are b0, b1, …? Why is important? – Translation-invariant interpolation Three control point case: for any t
8
Many control points p0 p1 p2 pn Straightforward, but not intuitive
9
Many control points A shortcut Goal: Idea: Magic: Getting b i (t) is easier! Why? is a polynomial of degree n Lagrange Interpolation If an n-degree polynomial has the same value at n+1 locations, it must be a constant polynomial
10
Lagrange Polynomial Interpolation
11
Lagrange Interpolation Demo http://www.math.ucla.edu/~baker/java/hoefer/L agrange.htm http://www.math.ucla.edu/~baker/java/hoefer/L agrange.htm Properties: – The curve passes through all the control points – Very smooth: C n for n control points – Do not have local control – Overshooting
12
Piecewise Cubic Polynomials Desired Features: – Interpolation – Local control – C1 or C2
13
Natural Cubics
14
If we have n points, how to use natural cubic to interpolate them? – Define the first and second derivatives for the starting point of the first segment. – Compute the cubic for the first segment – Copy the first and second derivatives for the end point of the first segment to the starting point for the second segment How many segments do we have for n control points? n-1
15
Natutral Cubic Curves Demo: http://www.cse.unsw.edu.au/~lambert/splines/
16
Natural Cubics Interpolate control points Has local controlC2 continuity Natural cubics
17
Hermit Cubics
18
Hermite Cubic Curves If we have n points, how to use Hermite cubic to interpolate them? – For each pair, using the first derivatives at starting and ending points to define the inbetween How many segments do we have for n controls? – n/2-1
19
Hermite Cubies Interpolate control points Has local controlC2 continuity Natural cubicsYesNoYes Hermite cubics
20
Catmull-Rom Cubics
21
Catmull-Rom Cubic Curves Demo http://www.cse.unsw.edu.au/~lambert/splines/C atmullRom.html http://www.cse.unsw.edu.au/~lambert/splines/C atmullRom.html n control points define n-2 segments Changing 1 point affects neighboring 4 segments
22
Cardinal Cubics s: tension control
23
Cardinal Cubic Curves 4 different s values
24
Interpolate control points Has local controlC2 continuity Natural cubicsYesNoYes Hermite cubicsYes No Cardinal Cubics
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.