Terna Engineering College: LAB Manual Part A
Terna Engineering College: LAB Manual Part A
Faculty:
LAB Manual
PART A
(PART A : TO BE REFFERED BY STUDENTS)
Experiment No.08
A.1 Aim:
Implement Bezier Curve using n Control Points.
A.2 Prerequisite:
1. C Language.
2. Geometric Concepts.
3. Curve Generation.
A.3 Outcome:
After successful completion of this experiment students will be able to,
A.4 Theory:
Bezier curve is discovered by the French engineer Pierre Bézier. These curves can be
generated under the control of other points. Approximate tangents by using control
points are used to generate curve. The Bezier curve can be represented mathematically
as −
∑k=0nPiBni(t)∑k=0nPiBin(t)
Where pipi is the set of points and Bni(t)Bin(t) represents the Bernstein polynomials
which are given by −
Bni(t)=(ni)(1−t)n−itiBin(t)=(ni)(1−t)n−iti
The simplest Bézier curve is the straight line from the point P0P0 to P1P1. A quadratic
Bezier curve is determined by three control points. A cubic Bezier curve is determined
by four control points.
A.5 Procedure:
Basic Algorithm
The objective here is to find points in the middle of two nearby points and iterate this
until we have no more iterations. The new values of points will give us the curve. The
famous Bezier equation is the exact formulation of this idea. Here is the algorithm:
Step 1: Select a value t Î [0,1]. This value remains constant for the rest of the steps.
Step 2: Set Pi[0] (t) = Pi, for i = 0,...,n.
Step 3: For j= 0,...,n, set for i = j,...,n.
Step 4: g (t) = Pn[n] (t)
PART B
(PART B : TO BE COMPLETED BY STUDENTS)
(Students must submit the soft copy as per following segments within two hours of the practical.
The soft copy must be uploaded on the Blackboard or emailed to the concerned lab in charge
faculties at the end of the practical in case the there is no Black board access available)
B.4 Conclusion:
Ans- Hence, we have successfully learned to apply Bezier Curve using n Control
Points implements in C.
Ans-
Ans-
ADVANTAGES: The benefit of Bezier curves is the ease of computation, stability at the
lower degrees of control points (warning! they do become unstable at higher degrees)
and a Bezier curve can be rotated and translated by performing the operations on the
points. See Paul Bourke's site for more properties of Bezier curves.
Ans- The term Bézier curve actually refers to a family of similar curves. SkiaSharp
supports three types of Bézier curves, called the cubic, the quadratic, and the conic.
Q.4] Implement Bezier Curve for n control points.
Ans-
OUTRPUT:
************************