Modelling and Representation 4 - Bezier, B-Spline and Subdivision Surfaces
Modelling and Representation 4 - Bezier, B-Spline and Subdivision Surfaces
Let Pi xi , yi , zi , 0 i 3
3
Q (u ) x(u ) y (u ) z (u ) Pi Bi (u ), 0 u 1
i 0
3 3 3
x(u ) xi Bi (u ), y (u ) yi Bi (u ), z (u ) zi Bi (u )
i 0 i 0 i 0
5.2 Bezier curves
Matrix form
Qu(1)=3(P2-P3)
Where Qu is the tangent vector to the curve at the end
point.
5.2 Bezier curves (Properties)
5.2 Bezier curves (Properties)
Another way of putting it is to say that the curve mimics the
shape of the control polygon.
An important property from the point of view of the
algorithm that deal with curves (and surfaces) is that a curve
is always enclosed in the convex hull formed by control
polygon.
5.2 Bezier curves
Applications
5.2.1 Joining Bezier curve segments
Constraints at the joins
positional continuity
S3=R0
first order continuity
(S3-S2)=k(R1-R0)
5.2.1 Joining Bezier curve segments
Possible Shape Editing Protocols
Maintaining the orientation of the line R1,S2 and moving the join point up and
down.
Maintaining the position of the join point and rotating the line R 1,S2 about
this point.
Moving all three control points as a locked unit.
5.2.2 Summary of Bezier curve
properties
A Bezier curve is a polynomial. The degree of the polynomial
is always one less than the number of control points.
The curve follows the shape of the control point polygon.
The control points do not exert local control. Moving any
control point affects all of the curve to a greater or lesser
extent.
The first and last control points are the end points of the
curve segment.
5.2.2 Summary of Bezier curve
properties
The tangent vectors to the curve at the end points are coincident
with the first and last edges of the control point polygon.
Moving the control points alters the magnitude and direction of
the tangent vectors.
The curve does not oscillate about any straight line more than
the control point polygon – this is known as the variation
diminishing property.
The curve is transformed by applying any affine transformation
to its control point representation.
5.3 B-spline curves
5.3.1 Uniform B-splines
5.3.2 Non-uniform B-splines
5.3.3 Summary of B-spline curve properties
5.3 B-spline curves
Composed of a series of m-2 curve segments, Q3,Q4,…,Qm
controlled by (m + 1) control points P0, P1, ..., Pm
each curve segment is controlled by 4 control points over a given
knot intervals:
P0, P1, P2, P3 --->Q3 defined on [u3, u4]
P1, P2, P3, P4 --->Q4 defined on [u4, u5]
...
Pm-3, Pm-2, Pm-1, Pm --->Qm defined on [um, um+1]
Degree 1
order
Degree 2
Degree 3
Degree 4
5.3.2 Non-uniform B-splines
Non-uniform B-splines using a knot vector [0,0,0,0,1,2,3,3,3,3]
5.3.2 Non-uniform B-splines
Flexibility of the B-splines (knot vector is [0,0,0,0,1,2,3,4,5,6,6,6,6])
5.3.2 Non-uniform B-splines
Multiple knots vs. Multiple control points
5.3.2 Non-uniform B-splines
Effect of knot multiplicity
5.3.2 Non-uniform B-splines
The effect of interior multiplicity (a)
5.3.2 Non-uniform B-splines
The effect of interior multiplicity (b) , Knot vector = [0,1,2,3,4,4,5,6,7,8,9]
5.3.2 Non-uniform B-splines
The effect of interior multiplicity (c), Knot vector = [0,1,2,3,4,4,4,5,6,7,8]
5.3.2 Non-uniform B-splines
The effect of interior multiplicity (d), Knot vector = [0,1,2,3,4,4,4,4,5,6,7,8]
5.3.3 Summary of B-spline curve
properties
The curve follows the shape of the control point polygon
and is constrained to lie in the convex hull of the control
points
The curve exhibits the variation diminishing property.
The curve is transformed by applying any affine
transformation to its control point representation.
A B-spline curve exhibits local control – a control point
connected to four segments (in the case of a cubic) and
moving a control point can only influence these
segments.
5.4 Rational curves
5.4.1 Rational Bezier curves
5.4.2 NURBS
5.4 Rational curves
A rational curve is a curve defined in four-
dimensional space – known as projective
space – which is then projected into three-
dimensional.
5.4.1 Rational Bezier curves
Consider the projection of a 3D Bezier curve in to 2D space:
(z=1)
We do this by dividing by z(u) to define a 2D curve R(u):
x(u ) y (u )
R(u ) ( , )
z (u ) x(u )
The 3D curve:
3
Q(u ) PiBi (u )
i 0
Pi ( xi, yi, zi )
5.4.1 Rational Bezier curves (cont.)
Now a special notation is used for writing the 3D control points of a
rational curve in 2D space:
Pi w ( wixi, wiyi, wi )
We write our 3D curve as:
3
wixi
Q (u ) wiyi Bi (u )
i 0
wi
wixiBi (u ) wiyiBi (u )
R(u ) ,
wiBi (u ) wiBi (u )
5.4.1 Rational Bezier curves
We project a 4D curve into 3D space
Each control point is now:
R(u )
w P B (u )
i i i
w B (u) i i
5.4.1 Rational Bezier curves
The effect of changing weight wi
5.4.1 Rational Bezier curves
The different effect of control point movement and weight
adjustment
5.4.2 NURBS
NURBS stands for Non-Uniform Rational B-
Splines.
admits the following possibilities:
Interactive placement and movement of control points.
Interactive placement and movement of knots.
Interactive control of control-point weights.
5.4.2 NURBS (Formulation of NURBS)
Let Pi ( xi, yi, zi )be a 3D point projected from a 4D point
Pi w ( wixi, wiyi, wizi, wi )
The 3D curve of NURBS
n w
R(u ) H Pi Bi , k (u )
i 0
n
PwB i i i, k (u )
i 0
n
wB
i 0
i i, k (u )
If wi = 1, for all i, then Ri,k(u)=Bi,k(u)
The curve is pulled towards a control point Pi if wi increases.
5.5 From curves to surfaces
Cubic Bezier patch surface The matrix specification
formulation of Equation
3 3
Q(u, v) PijBi (u ) Bj (v)
i 0 j 0
5.5 From curves to surfaces
Cubic Bezier patch surface
5.5 From curves to surfaces
The effect of lifting one of the control points
5.5 From curves to surfaces
Vectors at the corner of a patch.
The tangent vector at Q(0,0) in the u parameter direction.
Qu (0,0) 3( P10 P 00)
The tangent vector at Q(0,0) in the v parameter direction.
Qv (0,0) 3( P 01 P 00)
The cross-derivatives at each end point, sometimes called twist
vectors, specify the rate of change of the tangent vectors with respect
to u and v.
Quv(0,0) 9( P 00 P 01 P10 P11)
5.5 From curves to surfaces
Vectors at P00
5.5 From curves to surfaces (zero twist
surface)
If we set Quv(i,j) = 0 then se have a so-called zero twist
surface or a surface with four zero twist vectors.
若已知在邊緣的 12 個點 , 可求出中間四點 :
0= 9(P00-P01- P10 + P11) => P11=P01+ P10 - P00
where :
D p is a data point
u p is the knot value corresponding to the data point
R0 Q0 S 0 R3
R1 (Q 0 Q1) S 1 (Q1 Q 2) S 2
2 4 2
R 2 R1 (Q1 Q 2) S 2 (Q 2 Q 3)
2 4 2
R1 ( R 2 S 1) S 3 Q3
2
Curve subdivision
Using curve splitting to subdivide a
patch into four
Linearity criterions
Curve subdivision
Distances from the middle two points to the end point
joining line.
Image space subdivision
Controlling the depth of subdivision using
screen space criteria.
Called view dependent or screen space
controlled
Three ways to do this
Minimum space of the patch
Screen space flatness of the patch
Screen space flatness of the silhouette edge
Screen space flatness of the patch
5.8 Practical Bezier technology for
games
Down-sampling bi-quadratic meshes
Curves, objects and subdivision
5.8.1 Down-sampling bi-quadratic
meshes
A bi-quadratic patch is defined as:
2 2
Q(u , v) PijBi (u ) Bj (v)
i 0 j 0