CS 284: CAGD
Lecture #4 -- Mo 9/8, 2003.
PREVIOUS
< - - - - > CS
284 HOME < - - - - > CURRENT
< - - - - > NEXT
Preparation:
Read: Rockwood: pp 59-73 (Lagrange Interpolation)
Main Lecture Topic
How to make interesting, complex, smooth curves that interpolate given
points.
Last lecture: How to use Bezier curve segments, properly stitched together,
to make an interpolating spline.
This lecture: Another approach: Lagrange Interpolation
Stitching Bezier Curves Together -- what choices do we have ?
-
Remember Experiment from Class #1: (closed) interpolating curve through
N (2D) points.
-
Let's do this with N cubic Bezier segments -- one each between two subsequent
points.
-
Counting Degrees of Freedom (DoF)
-
Each control point in 2D has 2 DoF.
-
Each constraint imposed removes one DoF.
-
How many DoF are remaining ?
-
(3N for G1; or 2N for G2)
-
How to use these DoF's ?
-
Optimize the curve !
-
Make it as pleasing as possible: --> See Programming Assignment #1.
-
Find a good automated heuristic to place the extra control points.
-
Global Optimization (approximation)
-
Define a cost function:
-
E.g., Bending Energy = arc-length integral of square of curvature.
-
(Approximate this as best possible with Bezier segments).
-
How would you do this ?
-
Find out how each DoF affects the total Energy (e.g., by doing finite differences),
-
All these components form an overall gradient vector in 3N space,
-
Move along gradient vector towards local minumum in energy.
-
A specific example: Make a "pleasing" (low bending energy) figure 8 curves
from just two cubic Bezier segments.
-
How to set up the first guess ?
-
How many DoF?
-
First looks like 2 ...
-
but because of global scaling instability, there is only one -- e.g., the
angle athe central crossing.
-
How to use them ...
-
Evaluate the energy for some values of this angle,
-
do a binary search for minimum.
-
Advanced approaches to optimization ... later!
Not discussed yet, but useful in this context:
-
Degree
Elevation
-
Choosing higher-order basis to obtain more control points,
-
e.g., in order to match degrees of adjacent Bezier patches,
-
or to allow matching adjacent segments with curvature continuity.
-
The general formula for new control points;
-
Interpretation: think about redistributing the needed control points uniformaly
along a straight line.
Comments on SLIDE and Tcl
Current Homework Assignment: G1-Stitching of Bezier Curves
In this first programming assignment you will be introduced (gently) to
SLIDE and to the Tcl language. Your actual programming will be less than
ten lines of code (most of the expressions you will need have already been
provided), but it encourages experimentation and thinking.
The goal is to learn how to stitch cubic Bezier segments together to
make a smooth, pleasing-looking, interpolating curve that behaves well
even for rather ragged control polygons with irregularly spaced control
points (like the example we did in class by hand).
Your assignment is to find a robust expression for the placement for
the inner control points of each Bezier segment, involving only information
from the nearest neighbor points, and which guarantees a G1-continuous
overall curve.
DUE: Sept. 10, 2003, 9:10am.
Hand in:
Window snapshot showing your best solution;
The formula you used to place the inner control points;
A one paragraph discussion of your approach, and what you learned from
it;
any other comments you would like to make.
On line:
Put your SLIDE file in the proper place {see instructional
page};
Set the initial values for the sliders to the preferred value,
so that when we execute your program, your best solution,
the one that you handed in, will show up.
The code that you should modify and execute, as well as additional instructions
on how to run SLIDE can be found in
http://www-inst.eecs.berkeley.edu/~cs284/FA00/pa1/pa1.htm
Next Reading Assignment:
READ: Rockwood: pp 59-73 (Lagrange Interpolation)
if you have spare time, start reading:
"Fair,
G2- and C2-Continuous Circle Splines," by
C. H. Séquin, Kiha Lee, and Jane Yen, to be submitted to CAD.
Constructive criticism (specifically about understandability) is most
welcome!
PREVIOUS
< - - - - > CS
284 HOME < - - - - > CURRENT
< - - - - > NEXT
Page Editor: Carlo H. Séquin