CS 3414 Problem Statement 2
How do those simple drawing programs work?
One approach to drawing
a smooth curve that passes through a specified set of points is to use
a parametric representation of the curve. The idea is to
represent the curve by two functions
x(t) and y(t), one for the x-coordinate and
one for the y-coordinate.
A good choice for these functions is cubic splines.
The core of a drawing program would have to be a routine that computes
these splines, given the specified points. To make things more challenging,
there are several other issues that one might have to think about. For
example, here are a few:
- To do complicated drawings (e.g., cursive letters), it must be possible
to specify nonsmooth corners and points of discontinuity. Many
splines would be needed, in general.
- If it is desired that the curve appear to move as control points are
moved then
it will be important to compute and evaluate the interpolants
as quickly as possible.
- How flexible will the program be? Will users be allowed to add
new control points in the middle of a curve? Will they be allowed
to break an existing spline by introducing a
a discontinuity in function value or derivative? Will they be
allowed to smoothly link curves together?