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

Bezier Curve, B-Spline Curve

Deepika Rani Sahu


Assistant Professor
Department of CSE
Bezier Curve

• For cubic parametric Bezier form of the curve, two end points
and two other control points are taken which control the
tangent vectors at the end points.
Contd..

• Here P2, P3 are the two intermediate points which control the
tangent vectors at the end points.
• The starting and ending tangent vectors are determined by the
vectors P1P2 & P3P4 are related to R1 & R4 by:
R1 = Q`(0) = 3(P2 - P1)
R4 = Q`(1) = 3(P4 – P3)
𝑃1
𝑃2
The Bezier Geometry vector, GB =
𝑃3
𝑃4
Contd..

• We can relate the Hermite geometry vector GH and Bezier


geometry vector GB as:
𝑃1 1 0 0 0 𝑃1
𝑃4 0 0 0 1 𝑃2
• GH = = . = MHB.GB
𝑅1 −3 3 0 0 𝑃3
𝑅4 0 0 −3 3 𝑃4
• From Hermite curve we know
Q(t) = T.MH.GH = T. MH. MHB . GB = T.MB.GB
Where MB = MH. MHB
Contd..
2 −2 1 1 1 0 0 0
−3 3 −2 −1 0 0 0 1
• MB = .
0 0 1 0 −3 3 0 0
1 0 0 0 0 0 −3 3
−1 3 −3 1
3 −6 3 0
=
−3 3 0 0
1 0 0 0
Now Q(t) = T . MB. GB
= [t3 t2 t 1] .
Contd..

= (1-t)3 P1 + 3t(1-t)2 P2 + 3t2 (1-t) P3 + t 3 P4


𝑛
= ෌𝑖=0 𝑃𝑖 + 1 . 𝐵𝑖 , 𝑛 (𝑡)
Where Pi is set of control points
Bi,n (t) is the Blending function of the Bezier curve
n=3 for cubic polynomial
The Blending function is defined using a Benstein basis function
as :
𝑛!
Bi,n(t) = nCi . . ti (1-t)n-i where nCi =
𝑖! 𝑛−𝑖 !
Properties of Bezier curves
1. Generally follow the shape of the control polygon which
consists of the segments joining the control points.
2. Always pass through the first and last control points.
3. The curve is contained within convex hull of defined polygon
4. The degree pf the polynomial defining the curve segment is
one less than the number of defining control polygon point.
For 4 control points, the degree of the polynomial is 3 i.e.,
cubic polynomial
5. The basis function are real.
6. The order of the polynomial defining the curve segment us
equal to the total no. of control points.
7. No straight line intersects a Bezier curve more than it
intersects its control polygon.
Drawback of Bezier curve

• The degree of the Bezier curve depends on number of control


points.
• Bezier curve exhibit global control means moving a control
point alters the shape of the whole curve.
Bezier curve vs B-Spline curve

• When we change any of the control point respective location


in Bezier curve, the whole curve shape gets change. But in B-
spline curve, the only a specific segment of the curve-shape
gets changes or affected by the changing of the corresponding
location of the control points.
• In the B-spline curve, the control points impart local control
over the curve-shape rather than the global control like Bezier-
curve.
B-Spline curve

• B-spline curve shape before changing the position of control


point P1.
B-Spline curve

• B-spline curve shape after changing the position of control


point P1.
B-Spline curve

• B-splines curves are independent of the number of control


points and made up of joining the several segments smoothly,
where each segment shape is decided by some specific control
points that come in that region of segment.
B-Spline curve

• We have “n+1” control points in the above, so, n+1=8, so n=7.


• Let’s assume that the order of this curve is ‘k’, so the curve
that we get will be of a polynomial degree of “k-1”.
Conventionally it’s said that the value of ‘k’ must be in the
range: 2 ≤ k ≤ n+1.
• So, let us assume k=4, so the curve degree will be k-1 = 3.
• The total number of segments for this curve will be calculated
through the following formula –
• Total no. of seg = n – k + 2 = 7 – 4 + 2 = 5.
B-Spline Curve

• There are two types of B-spline curves:


– Uniform Non-rational B-Splines
– Non-uniform, Non-rational B-splines
Uniform Nonrational B-Spline
• B-spline consists of curve segment whose polynomial
coefficients depend on just a few control points. This is called
local control because this control point affect only a small part
of a curve.
• The curve need not pass through the control points.
• Cubic B-splines approximate a series of m+1 control points
P0, P1, …, Pm, m≥3 with a curve consisting of m-2 cubic
polynomial curve segments Q3, Q4, …, Qm.
Uniform Nonrational B-Spline

• The parameter range of Qi is defined as ti ≤ t ≤ ti+1 for 3 ≤ i ≤


m
• For each 𝑖 ≥ 4, there is a join point or knot between Qi-1 and
Qi at the parameter value ti is known as knot value.
• The initial and final points at t3 and tm+1.
• So, there are m+1 control points (P0,P1…Pm), m-2 segments
(Q3,Q4,..,Qm) and m-1 knots (t3,t4,..tm, tm+1 )
Uniform Nonrational B-Spline

• The term uniform means the knots are spaced at equal


intervals of the parameter t.
• We can assume that t3=0 and ti+1 – ti =1.
• In a rational cubic polynomial curve x(t), y(t) and z(t) are
defined as ratio of two cubic polynomials.
• The B stands for basis, since the spline can be represented as
weighted sums of polynomial basis function.
• Each of the m-2 curve segments of a B-Spline curve is defined
by four control points out of m+1 control points.
• The curve segment Qi is defined by points Pi-3, Pi-2, Pi-1, Pi.
Uniform Nonrational B-Spline

• Thus the geometry vector for segment Qi is


𝑃𝑖−3
𝑃𝑖−2
Gbsi = ,3 ≤𝑖≤𝑚
𝑃𝑖−1
𝑃𝑖
Contd..
Contd..
• The parametric equation is Q(t) = T . M .G
• The B-Spline formulation for curve segment i is
Qi(t) = Ti. MBS. GBSi, 𝑡𝑖 ≤ 𝑡 ≤ 𝑡𝑖 +1

−1 3 −3 1
1 3 −6 3 0
• The B-Spline basis matrix, MBS = 6
−3 0 3 0
1 4 1 0
• The B-Spline blending function
• BBS = Ti . MBS
• The blending function for each curve segment are exactly same,
because for each segment i the values of t - ti range from 0 at t = ti
to 1 at t = ti+1
Contd.

• If we replace t – ti by t and the interval [ ti, ti+1 ] by [0,1]

• BBS = Ti . MBS = [ t3 t2 t 1] .

−𝑡 3 +3𝑡 2 −3𝑡+1 3𝑡 3 −6𝑡 2 +4 −3𝑡 3 +3𝑡 2 +3𝑡+1 𝑡3


=
6 6 6 6
Properties of B-Spline curve

1. Qi and Qi+1 are C0, C1 & C2 continuous where they join.


2. The sum of the B-Spline basis functions for any parameter
value is 1.
3. The maximum order of the curve is equal to the number of
vertices of defining polygon.
4. The degree of B-spline polynomial is independent on the
number of vertices of defining polygon.
5. B-Spline allows the local control over the curve surface
because each vertex affects the shape of a curve obey over a
range of parameter values.

You might also like