Control Points• We can specify control points to draw the curve... Polynomial Curves• Could make a curve that passes through n control points out of a degree n-1 polynomial – Regression,
Trang 1Curve and Surface
Trang 2• Subdivision Curves & Surfaces
• Appendix: Subdivision Masks
Trang 3How to describe this curve?
Trang 4Control Points
• We can specify control points to draw the curve
Trang 5Control Points
• Control points are not a unique specification
Trang 6• A polynomial is a function of the form:
f(t) = ant n + an-1t n-1 + … + a1t + a0
• n is the degree of the polynomial
• The order of the polynomial is the number of
Trang 7Polynomial Curves
• Could make a curve that passes through n
control points out of a degree (n-1) polynomial
– Regression, Lagrange interpolation, etc.
Trang 8Polynomial Curves
• Polynomial curves wiggle too much when forced
to fit more and more points
• In technical terms this is called overfitting
Trang 9Why Parametric Curves?
• Parametric curves are very flexible
• They are not required to be functions
• Curves can be multi-valued with respect to any coordinate system
Trang 10Particle Motion
• A parametric curve P(t) describes the motion of
an imaginary particle through space at time t
• We can compute the velocity of the particle:
• The tangent line at P(t0) to the curve is:
Trang 11Parametric Polynomial Curves
• A parametric polynomial curve is a parametric curve
• where each function x(t), y(t)
n
i i i
Trang 12Curve Drawing
• We want:
– Predictable control: Curves don’t wiggle
– Multiple values: Curves of arbitrary length
– Local control: Local edits have local effects
– Versatility: Be able to draw any curve
– Continuity: Smoothness guarantees
• Spline curvesgive us all of these
Trang 13Spline Curves
• The word splinecomes from ship building with wood
• A wooden plank is forced between fixed posts,
called “ducks”
• Real-world splines are still being used for designing ship hulls, automobiles, and aircraft fuselage and
wings
Trang 14www.abm.org
Trang 15• We have seen parametric polynomials Let’s
look at the other terms:
– Piecewise
– Continuity conditions
Trang 16– Advantages: Provides flexibility
– Problem: How do we fit the pieces together?
Trang 17Parametric Continuity
• C0: Curves are joined
– “watertight” curve / mesh
• C1: First derivative is continuous
– d/dt Q(t) = velocity is the same.
– “looks smooth, no facets”
• C2: Second derivative is continuous
– d 2 /dt 2 Q(t) = acceleration is
the same (important for animation
and shading)
Trang 18Geometric Continuity
• G0: Curves are joined
• G1: First derivatives are proportional at the joint point
– The tangent vectors have the same directions, but not
necessarily the same magnitude
– Velocity of a moving point is not continuous
• G2: First and second derivatives are proportional at joint point
– Acceleration of the point is not continuous
• Parametric continuity of order n implies geometric
continuity of order n, but not vice-versa.
Trang 19Specifying Splines
• Control Points - a set of
points that influence the
curve's shape
• Hull - the lines that
connect the control points
Trang 20Parametric Cubic Curves
• In order to assure C2 continuity our functions
must be of at least degree three
• Here's what a 2D parametric cubic function looks like:
• In matrix form:
Trang 21Parametric Cubic Curves
• This is a cubic function in 3D:
• To avoid the dependency on the dimension we will use the following notation:
Trang 22Parametric Cubic Curves
• What does the derivative of a cubic curve look like?
Trang 23Solving for Coefficients
• Problem: Polynomial coefficients (the c’s) are
amazingly bad control knobs
• Usually, we want to control the curve in terms of what
it does — passing through control points, etc.
• The whole story of polynomial splines is deriving
their coefficients given a set of control points and
continuity conditions
• Approach:
– State what we want the curve to do
– Solve for coefficients that satisfy the constraints set by the
Trang 24• Subdivision Curves & Surfaces
• Appendix: Subdivision Masks
Trang 25Cubic Hermite Specification
• Given:
– Two control points (P1, P2).
– Tangents (derivatives) at the knot points (P’1, P’2):
Trang 26Hermite Spline
• 4 segments, (P1, P2) and (P’1, P’2) for each
segment
Trang 27Building it up…
• Cubic curve equations:
• Boundary constraints:
Trang 28Solve for the c’s