Keyframing and splines l.jpg
Sponsored Links
This presentation is the property of its rightful owner.
1 / 34

Keyframing and Splines PowerPoint PPT Presentation

  • Uploaded on
  • Presentation posted in: General

Keyframing and Splines. Jehee Lee Seoul National University. What is Motion ?. Motion is a time-varying transformation from body local system to world coordinate system (in a very narrow sense). World coordinates. What is Motion ?.

Download Presentation

Keyframing and Splines

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

Keyframing and splines l.jpg

Keyframing and Splines

Jehee Lee

Seoul National University

What is motion l.jpg

What is Motion ?

  • Motion is a time-varying transformation from body local system to world coordinate system (in a very narrow sense)


What is motion3 l.jpg

What is Motion ?

  • Motion is a time-varying transformation from body local system to world coordinate system

World coordinates

Body local coordinates

What is keyframing l.jpg

What is Keyframing ?

World coordinates

Body local coordinates

Transfomation l.jpg


  • Rigid transformation

    • Rotate + Translate

    • 3x3 orthogonal matrix + 3-vector

  • Affine transformation

    • Scale + Shear + Rigid Transf.

    • 3x3 matrix + 3-vector

  • Homogeneous transformation

    • Projective + Affine Transf.

    • 4x4 homogeneous matrix

  • General transformation

    • Free-form deformation

Particle motion l.jpg

Particle Motion

  • A curve in 3-dimensional space

World coordinates

Keyframing particle motion l.jpg

Keyframing Particle Motion

  • Find a smooth function that passes through given keyframes

World coordinates

Polynomial curve l.jpg

Polynomial Curve

  • Mathematical function vs. discrete samples

    • Compact

    • Resolution independence

  • Why polynomials ?

    • Simple

    • Efficient

    • Easy to manipulate

    • Historical reasons

Degree and order l.jpg

Degree and Order

  • Polynomial

    • Order n+1(= number of coefficients)

    • Degree n

Polynomial interpolation l.jpg

Polynomial Interpolation

  • Linear interpolation with a polynomial of degree one

    • Input: two nodes

    • Output: Linear polynomial

Polynomial interpolation11 l.jpg

Polynomial Interpolation

  • Quadratic interpolation with a polynomial of degree two

Polynomial interpolation12 l.jpg

Polynomial Interpolation

  • Polynomial interpolation of degree n

Do we really need to solve the linear system ?

Lagrange polynomial l.jpg

Lagrange Polynomial

  • Weighted sum of data points and cardinal functions

  • Cardinal polynomial functions

Limitation of polynomial interpolation l.jpg

Limitation of Polynomial Interpolation

  • Oscillations at the ends

    • Nobody uses higher-order polynomial interpolation now

  • Demo

    • Lagrange.htm

Spline interpolation l.jpg

Spline Interpolation

  • Piecewise smooth curves

    • Low-degree (cubic for example) polynomials

    • Uniform vs. non-uniform knot sequences


Why cubic polynomials l.jpg

Why cubic polynomials ?

  • Cubic (degree of 3) polynomial is a lowest-degree polynomial representing a space curve

  • Quadratic (degree of 2) is a planar curve

    • Eg). Font design

  • Higher-degree polynomials can introduce unwanted wiggles

Basis functions l.jpg

Basis Functions

  • A linear space of cubic polynomials

    • Monomial basis

    • The coefficients do not give tangible geometric meaning

Bezier curve l.jpg

Bezier Curve

  • Bernstein basis functions

  • Cubic polynomial in Bernstein bases

Bezier control points l.jpg

Bezier Control Points

  • Control points (control polygon)

  • Demo

    • Bezier.htm

Properties of bezier curves l.jpg

Properties of Bezier Curves

  • The curve is contained in the convex hull of the control polygon

  • The curve is invariant under affine transformation

    • Partition of unity of Bernstein basis functions

  • Variation diminishing

  • End point interpolation

Properties of cubic bezier curves l.jpg

Properties of Cubic Bezier Curves

  • The tangent vectors to the curve at the end points are coincident with the first and last edges of the control point polygon

Bezier splines with tangent conditions l.jpg

Bezier Splines with Tangent Conditions

  • Find a piecewise Bezier curve that passes through given keyframes and tangent vectors

  • Adobe Illustrator provides a typical example of user interfaces for cubic Bezier splines

Catmull rom splines l.jpg

Catmull-Rom Splines

  • Polynomial interpolation without tangent conditions

    • -continuity

    • Local controllability

  • Demo

    • CatmullRom.html

Natural cubic splines l.jpg

Natural Cubic Splines

  • Is it possible to achieve higher continuity ?

    • -continuity can be achieved from splines of degree n

Natural cubic splines25 l.jpg

Natural Cubic Splines

  • We have 4n unknowns

    • n Bezier curve segments(4 control points per each segment)

  • We have (4n-2) equations

    • 2n equations for end point interpolation

    • (n-1) equations for tangential continuity

    • (n-1) equations for second derivative continuity

  • Two more equations are required !

Natural cubic splines26 l.jpg

Natural Cubic Splines

  • Natural spline boundary condition

  • Closed boundary condition

  • High-continuity, but no local controllability

  • Demo

    • natcubic.html

    • natcubicclosed.html

B splines l.jpg


  • Is it possible to achieve both -continuity and local controllability ?

    • B-splines can do !

  • Uniform cubic B-spline basis functions

Uniform b spline basis functions l.jpg

Uniform B-spline basis functions

  • Bell-shaped basis function for each control points

  • Overlapping basis functions

    • Control points correspond to knot points

B spline properties l.jpg

B-spline Properties

  • Convex hull

  • Affine invariance

  • Variation diminishing

  • -continuity

  • Local controllability

  • Demo

    • Bspline.html

Nurbs l.jpg


  • Non-uniform Rational B-splines

    • Non-uniform knot spacing

    • Rational polynomial

      • A polynomial divided by a polynomial

      • Can represent conics (circles, ellipses, and hyperbolics)

      • Invariant under projective transformation

  • Note

    • Uniform B-spline is a special case of non-uniform B-spline

    • Non-rational B-spline is a special case of rational B-spline

Cubic spline interpolation in a b spline form l.jpg

Cubic Spline Interpolation in a B-Spline Form

Cubic spline interpolation in a b spline form32 l.jpg

Cubic Spline Interpolation in a B-Spline Form

Summary l.jpg


  • Polynomial interpolation

    • Lagrange polynomial

  • Spline interpolation

    • Piecewise polynomial

    • Knot sequence

    • Continuity across knots

      • Natural spline ( -continuity)

      • Catmull-Rom spline ( -continuity)

    • Basis function

      • Bezier

      • B-spline

Programming assignment 1 curve editor l.jpg

Programming Assignment #1: Curve Editor

  • Implement 2D curve editing interfaces

    • Select among three types of splines

      • B-splines

      • Catmull-rom splines

      • Natural cubic splines

    • Open/Closed

    • Add/Remove/Drag control points

  • Due April 11

  • Login