Starting from:

$30

Project 4: “A SIMPLE BEZIER AND B-SPLINE CURVE EDITOR”

Course: “Computer Graphics,” ECS 175
Project 4: “A SIMPLE BEZIER AND B-SPLINE CURVE EDITOR” 
Remark: You must NOT use OpenGL’s routines for generating B´ezier or Bspline curves! You can use OpenGL for rendering but not for evaluating these curves.
The fourth project requires the implementation of a 2D B´ezier and B-spline curve
editor. A 2D B´ezier curve is defined as
c(t) =
x(t), y(t)
?T
=
Xn
i=0
bi B
n
i
(t) = Xn
i=0
(xi
, yi)
T
?
n
i
?
(1 − t)
n−i
t
i
, t ∈ [0, 1].
For the evaluation of a B´ezier curve, use the de Casteljau algorithm to compute points
on the curve. A single 2D parametric B-spline curve is defined as
c(t) =
x(t), y(t)
?T
=
Xn
i=0
di N
k
i
(t) = Xn
i=0
(xi
, yi)
T N
k
i
(t) , t ∈ [τk−1, τn+1].
Remember that you do not need to evaluate the normalized B-spline basis functions Nk
i
(t).
For the evaluation of a B-spline curve, use the de Boor algorithm to generate points on
the curve.
When dealing with a B´ezier curve, the user must be able to add, insert, delete,
and modify the B´ezier points bi
. The same applies to a B-spline curve: The user
must be able to add, insert, delete, and modify the de Boor points di
. In addition
to this, the user must be able to change the order k of a B-spline curve and modify the
values of the knots τ0, ... , τn+k. Initially, you can define the order to be k = 2 and the
knots to be τi = i, i = 0, ..., n + k.
The user must be able to specify the number of points used for rendering a B´ezier
or B-spline curve by a sequence of line segments (“display resolution”).
The user should be able to change all parameters easily by providing a screen
area used for displaying and specifying the coordinates of control points (B´ezier and de
Boor points), the order and the knots of a B-spline curve, and the display resolution. The
specification of control points should be made as easy as possible. Either the user types
in the control information directly, or – when modifying control points – uses a “rubber
band” technique to interactively move control points.
The curve editor must provide a facility to store the parameters defining a B´ezier
or B-spline curve. The system must be capable of reading and writing control information for B´ezier and B-spline curves.
It must be possible to manipulate, create, and display a scene containing multiple
B´ezier and multiple B-spline curves. Make it possible to select a certain curve and to
operate just on the selected one!
Besides having to hand in a program listing, please prepare a “manual sheet” explaining how to use your program.
The overall grade (on a scale from 0 to 100) will depend on i) completeness (40%),
ii) correctness (40%), iii) interface quality (15%), and iv) the manual sheet (5%).
No project will be accepted when it is more than seven (7) days late; for each day, one (1)
point will be deduced.
DO NOT REMOVE YOUR PROGRAM! YOU WILL BE ABLE TO USE
IT IN THE NEXT ASSIGNMENT(S).
H A V E F U N ! ! !
2

More products