Homework 5
When you have finished the assignment,
email your source code to the grader at wanghua@cs.nyu.edu,
and post the working applet onto the web.
Note:
I neglected in class to talk about one very important
property of Bezier splines.
If you want two successive spline segments (say,
the one controlled by knot points
P1,
P2,
P3,
P4,
followed by the one controlled by knot points
P4,
P5,
P6,
P7)
to join together smoothly - so that
the curve doesn't suddenly change slope
at P4 -
then you need to make the line segment
[P3,P4]
collinear with
[P4,P5].
Similarly, for a Hermite spline,
if you want two successive segments
join together smoothly - so that
the curve doesn't suddenly change slope
at their common point -
then the R vector at the end of
the first segment must be oriented in the same
direction as the R vector
at the beginning of the second segment.
Note that the two R vectors don't need to have the same magnitude -
they need only be oriented in the same direction.
Create an applet that
lets the user create a Bezier or Hermite or Bspline curve.
Feel free to play with this one,
as long as the following
conditions must be met:
-
The spline must involve multiple parametric-cubic curves
(more than one).
For example, if you do a Bezier, you have to let the
user specify more than just the four points
P1,
P2,
P3,
P4,
(since that would only require a single parametric-cubic curve).
-
Your spline must remain smooth across
the boundaries between
it individual parametric-cubic curves.
If you read the "Note" above,
you won't have any problem figuring out how to do this.