CS 184: COMPUTER GRAPHICS


PREVIOUS < - - - - > CS 184 HOME < - - - - > CURRENT < - - - - > NEXT

Lecture #23 -- Mo: 11/18, 2002.

More on Splines

Key Concepts

Interpolating versus Approximating Splines
Parametric versus Geometric Continuity:

Cubic Bezier Curves and Hermite Splines

Basic underlying math;
(Cubic) Polynomial: infinitely differentiable --> Continuity = C-infinity
Cubic Hermite Spline: 2 endpoints, 2 tangent directions.
Cubic Bezier Curve: 2 endpoints, 2 approximated intermediary control points.
    -- (P1,P2) = 1/3 of starting velocity vector
    -- (P3,P4) = 1/3 of ending velocity vector
Influence of parameters (qualitative view).
DOF's.

Properties of Bezier Curves

  • Cubic polynomial, ==> true space curves;
  • Interpolates endpoints;
  • Approximation of other two control points;
  • End tangents defined by pairs of control points;
  • Convex hull property;
  • Invariant under affine transformations;
  • Start-to-end symmetry;
  • Infinitely differentiable;
  • May have loops, cusps.
  • Bicubic Bezier Patches

    Now we have two parameters (u,v). Apply the above principle twice:
        -- Step one: make a few control curves (say as a function of v);
        -- Use these control curves to define a whole familiy of curves in the u-direction.
    All this forms a two-parameter patch.
    Putting patches together with G1- or G2- continuity is not trivial
    (same issues as for curves -- only more of them!).

    Construction of Bezier Curves

    DeCasteljau construction algorithm: (Construction by three iterations of linear interpolation)
    The role of the control points.
        -- How to draw a Bezier curve from its control points:
        -- Subdivision of a Bezier curve into two pieces that together are identical to the original one.
    How to put two Bezier segments together with G1 or with C1 continuity.
    How to approximate a given smooth curve with Bezier segments.
     

    B-Spline Curves

    An easy way to make a smooth C2-continuous space curve for a path of an airplane or for a camera path is to sprinkle a few control points through space that define the coarse topology and geometry of the curve and then let them be approximated by a cubic B-spline. Assuming for the moment a closed curve with N=6 control points, such a curve would be described as a sequence of N=6 cubic curve segments, each one of which is controlled by four consecutive control points, but producing a curve segment that is only about as long as the distance between the two middle control points. Because a subsequent curve segment reuses three of the control points of the previous segment, they blend together in a very smooth (C2-continuous) way. The interpolation function is given in the text book.

    In a nutshell, one segment depending on the 4 control points A,B,C,D, is given by the polynomial:

    Q = A(1 -3t +3t^2 -t^3)/6 + B(4 -6t^2 +3t^3)/6 + C(1 +3t +3t^2 -3t^3)/6 + D(t^3)/6

    thus the point at t=0 is given by  A/6 + 4B/6 + C/6,
    and the point at t=1 is given by  B/6 + 4C/6 + D/6.
     

    Properties of Cubic B-Splines

  • Piecewise cubic polynomial;
  • Does NOT interpolate control points;
  • Convex hull property;
  • Construction by 3-fold linear interpolation
  • Invariant under affine transformations;
  • Start-to-end symmetry;
  • Twice differentiable (C2) at joints;
  • Infinitely differentiable everywhere else;
  • May have cusps, thus may not be G2 everywhere;
  • Good to make smooth closed loops.

  •  

    B-Spline Surfaces

    Apply B-Spline machinery in two different directions.
    Creates a small patch near the central "mesh" of the control point grid.
    Will create smooth surfaces if the control points are properly reused (overlaped) for adjacent patches.
    Much easier than stitching together Bezier patches -- but creates an approximating surface!
     

    Use of Splines in your Final Projects

  • Smooth camera paths.
  • Rollercoaster tracks.
  • Snake bodies.
  • Curved smooth bodies and shells.

  •  

     

    A good introductory booklet on Splines with interactive demos:
    "Interactive Curves and Surfaces," (with Multimedia Tutorial on CAGD),
    A. Rockwood and P. Chambers, Morgan Kaufman Publishers, Inc.


    Reading Assignment:

    Study: 2ndEd: Ch 10-10.6
    Study: 3rdEd: Ch 10-10.6

    Skim: On-line information on OpenGL

    Current Homework Assignment: (new Due Date: Nov. 19, 02)

    ASG#9  "Procedural Generation and Rendering"
    CAN BE DONE WITH YOUR PARTNER OF CHOICE !


    PREVIOUS < - - - - > CS 184 HOME < - - - - > CURRENT < - - - - > NEXT
    Page Editor: Carlo H. Séquin