Unit 5-19-01-2021

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Computer Graphics

5th Unit
M.A. Zahed
Lecturer in computer
Government Polytechnic Ahmednagar
Objectives
-After learning this unit student can able to
• Describe the given curve generation methods
• Draw curve using the given curve algorithm
• State properties of the give curve
• Generate arc using the given algorithm
Introduction to curve
• 
Curve Generation
• 
B-spline curve

• A B-spline curve is defined as a linear combination of control points.


a stripe, which we have to move around the sample points
• Properties:
1. The sum of the B-spline basis functions for any parameter value is 1.
2. Each basis function is positive or zero for all parameter values.
3. Each basis function has precisely one maximum value, except for k=1.
4. The curve line within the convex hull of its defining polygon.
5. The maximum order of the curve is equal to the number of vertices of defining polygon.
6. The degree of B-spline polynomial is independent on the number of vertices of defining polygon.
7. B-spline allows the local control over the curve surface because each vertex affects the shape
of a curve only over a range of parameter values where its associated basis function is nonzero.
8. The curve exhibits the variation diminishing property.
9. The curve generally follows the shape of defining polygon.
10.Any affine transformation can be applied to the curve by applying it to the vertices of defining
polygon.
Bezier Curve
• Defined by control points
• It is constructed by simply
calculating midpoints
• The points P0,0, P1,0, P2,0, P3,0 are
control points. Here we have 3 lines,
so we have to find the midpoints of
these lines as, P0,1, P1,1, P2,1
• Then again find the mid point of
these newly generated lines as P0,2,
P1,2.
• And find midpoint of these line as P0,
3.
• this point P0,3. divides curve into two
sections one is (P0,0, P0,1, P0,2, P0,3) and
second will be (P3,0, P2,1, P1,2, P0,3)
Bezier Curve
• Properties of Bezier Curves
1.They generally follow the shape of the control polygon, which
consists of the segments joining the control points.
2.They always pass through the first and last control points.
3.They are contained in the convex hull of their defining control points.
4.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.
5.A Bezier curve generally follows the shape of the defining polygon.
6.The direction of the tangent vector at the end points is same as that
of the vector determined by first and last segments.
7.The convex hull property for a Bezier curve ensures that the
polynomial smoothly follows the control points.
8.No straight line intersects a Bezier curve more times than it
intersects its control polygon.
9.Bezier curves exhibit global control means moving a control point
alters the shape of the whole curve.
Example on Bezier curve
• 
B(10,40),
C(70,30),

A(0,0),
D(60,-20),

B(10,40),
P2
C(70,30), B(10,40),
P2
C(70,30),
B(10,40),
P2
C(70,30),
P4
P5
P1 P4
P3 P1 P5
P3 P6
P1
P3
A(0,0),
A(0,0),
D(60,-20),
D(60,-20), A(0,0),
D(60,-20),
• Now consider one set of four sample points , and again
carry out the same procedure till the length of line
segment becomes equal to one pixel. At last stage we
will get following curve
B(10,40),
P2
C(70,30),

P4
P5
P6
P1
P3

A(0,0),
D(60,-20),
Bezier Curve B-Spline Curve

Any shape of curve is achieved We can achieve smooth curves

Depending on sequence of control Depending on sequence of control


points shape of curve gets changed points shape of curve is not changed

Sharp corner are achieved by passing We can achieve sharp corner by using
curve from the sample points blending function repeatedly for same
points

Curve always passes from minimum In special case curve may not pass
two points starting and ending points from any of the sample points

You might also like