Docsity

Computer graphics- Bezier Curve, Study notes of Computer Graphics

Toggle sidebar
bg1
ASSIGNMENT NO.
AIM :- Write C++ program to draw any object such as flower, waves using
Bezier curve generation technique.
OBJECTIVE :To generate curves using curve generation techniques
THEORY :
Curve:
A curve is an infinitely large set of points.
Bezier Curves:
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. It is determined by
defining a polygon. These are easy to implement and hence widely used in
various CAD systems and graphic packages.
Bézier curves are also used in the time domain, particularly in animation, user
interface design and smoothing cursor trajectory in eye gaze controlled
interfaces.
Properties of Bezier Curves:
Bezier curves have the following properties −
They generally follow the shape of the control polygon, which consists
of the segments joining the control points.
They always pass through the first and last control points.
They are contained in the convex hull of their defining control points.
The degree of the polynomial defining the curve segment is one less that
the number of defining polygon point. Therefore, for 4 control points,
the degree of the polynomial is 3, i.e. cubic polynomial.
A Bezier curve generally follows the shape of the defining polygon.
The direction of the tangent vector at the end points is same as that of
the vector determined by first and last segments.
No straight line intersects a Bezier curve more times than it intersects
its control polygon.
Bezier curves exhibit global control means moving a control point
alters the shape of the whole curve.
pf3

Partial preview of the text

Download Computer graphics- Bezier Curve and more Study notes Computer Graphics in PDF only on Docsity!

ASSIGNMENT NO.

AIM :- Write C++ program to draw any object such as flower, waves using

Bezier curve generation technique.

OBJECTIVE :To generate curves using curve generation techniques

THEORY :

Curve: A curve is an infinitely large set of points.

Bezier Curves:

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. It is determined by defining a polygon. These are easy to implement and hence widely used in various CAD systems and graphic packages. Bézier curves are also used in the time domain, particularly in animation, user interface design and smoothing cursor trajectory in eye gaze controlled interfaces.

Properties of Bezier Curves:

Bezier curves have the following properties −

 They generally follow the shape of the control polygon, which consists

 of the segments joining the control points.^   They always pass through the first and last control points. 

^ ^ They are contained in the convex hull of their defining control points.^   The degree of the polynomial defining the curve segment is one less that the number of defining polygon point. Therefore, for 4 control points, the degree of the polynomial is 3, i.e. cubic polynomial. 

 ^ A Bezier curve generally follows the shape of the defining polygon.^   The direction of the tangent vector at the end points is same as that of

 the vector determined by first and last segments.^   No straight line intersects a Bezier curve more times than it intersects

 its control polygon.^   Bezier curves exhibit global control means moving a control point alters the shape of the whole curve. 

Given the coordinates of control points Pi: the first control point has

coordinates P 1 = (x 1 , y 1 ), the second: P 2 = (x 2 , y 2 ), and so on, the

curve coordinates are described by the equation that depends on the

parameter t from the segment [0,1].

For four points:

P = (1−t)^3 P 1 + 3(1−t)^2 tP 2 +3(1−t)t^2 P 3 + t^3 P 4

Also write summation formula here

Algorithm to generate curve(wave) using Bezier curve:

Step 1 : Get 4 control points as P0(a,b),P1(a1,b1),P2(a2,b2),P3(a3,b3).

Step 2 : Select a value t [0,1]. This value remains constant for the rest of the steps.