Você está na página 1de 28

AML710 CAD LECTURE 15

SPACE CURVES

B spline curves and their


construction
Description of B-Spline
n +1
P(t ) = Bi N i ,k (t ) t min ≤ t ≤ t max 2 ≤ k ≤ n +1
i =1

– k=degree
• Can be 2 to the number of
control points
– If k set to 1, then only a
plot of the control points
• Bi is the input set of n+1 control points
(polygon vertices)
• Parameter t now depends on how we
choose the other parameters (no
longer locked to 0-1)
• N i,k blending functions
Polynomials of degree k-1at each
interval xi≤ t≤xi+1
B-Spline blending functions
defined by Cox-deBoor recursion formula

1 if xi ≤ t ≤ xi +1
N i ,1 (t ) =
0 otherwise

and

(t − xi ) N i ,k −1 (t ) ( xi + k − t ) N i +1,k −1 (t )
N i ,k (t ) = +
xi + k −1 − xi xi + k − xi +1
Calculating Uniform Periodic
functions
• Calculate 4 third order (k=3) basis functions
Ni,3(t),I=1,2,3,4
• Here N+1=4
• Calculating knot vector: Calculation of
N6,1requires x6 and x7 while N1,1requires x1 and
x2 Therefore, in all we need n+k+1 knot values,
i.e, [X]=[0 1 2 3 4 5 6 ]
0 ≤ t ≤1
N1,1 (t) = 1; N i,1 (t) = 0 i ≠1
N1,2 (t) = t ; N i,2 (t) = 0 i ≠1
t2
N1,3 (t) = ; N i,3 (t) = 0 i ≠1
2
Uniform Periodic basis (contd.)
1≤ t ≤ 2
N 2,1 (t) = 1; N i,1 (t) = 0 i≠2
N1,2 (t) = (2 − t ); N 2,2 (t) = (t − 1); N i,2 (t) = 0 i ≠ 1,2
t 3−t
N1,3 (t) = (2 − t ) + (t − 1);
2 2
(t - 1) 2
N 2,3 (t) = ; N i,3 (t) = 0 i ≠ 1,2,3
2
Uniform Periodic basis (contd.)
2≤t≤3
N 3,1 (t) = 1; N i,1 (t) = 0 i≠3
N 2,2 (t) = (3 − t ); N 3,2 (t) = (t − 2); N i,2 (t) = 0 i ≠ 2,3
(3 − t ) 2
N1,3 (t) = ;
2
(t - 1)(3 - t) (4 - t)(t - 2)
N 2,3 (t) = + ;
2 2
(t − 2) 2
N 3,3 (t) = N i,3 (t) = 0 i ≠ 1,2,3
2
Uniform Periodic basis (contd.)
3≤ t ≤ 4
N 3,1 (t) = 1; N i,1 (t) = 0 i≠4
N 3,2 (t) = (4 − t ); N 4,2 (t) = (t − 3); N i,2 (t) = 0 i ≠ 3,4
(4 − t ) 2
N 2,3 (t) = ;
2
(t - 2)(4 - t) (5 - t)(t - 3)
N 3,3 (t) = + ;
2 2
(t − 3) 2
N 4,3 (t) = N i,3 (t) = 0 i ≠ 2,3,4
2
Uniform Periodic basis (contd.)

4≤t≤5
N 5,1 (t) = 1; N i,1 (t) = 0 i≠5
N 4,2 (t) = (5 − t ); N 5,2 (t) = (t − 4); N i,2 (t) = 0 i ≠ 4,5
(5 − t ) 2
N 3,3 (t) = ;
2
(t - 3)(5 - t) (6 - t)(t - 4)
N 4,3 (t) = + ; N i,3 (t) = 0 i ≠ 3,4
2 2
Uniform Periodic basis (contd.)
5≤ t ≤6
N 6,1 (t) = 1; N i,1 (t) = 0 i≠6
N 5,2 (t) = (6 − t ); N i,2 (t) = 0 i≠5
2
(6 - t)
N 4,3 (t) = ; N i,3 (t) = 0 i≠4
2
Uniform Periodic functions
1
N1,3
0.9 N2,3
N3,3
0.8 N4,3

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0
0 1 2 3 4 5 6
Uniform Periodic B-spline
9

0
0 1 2 3 4 5 6 7 8 9
Periodic B-spline Curve

Ni,k is a polynomial of order k (degree k-1) on each interval ti < t < ti+1. k
must be at least 2 (linear) and can be not more, than n+1 (the number of
control points). A knot vector (x1 , x2 , ... , xn+k) must be specified. Across
the knots basis functions are
C k-2 continuous
Periodic B-spline Curve
Periodic B-spline Curve
Periodic B-spline Curve
Periodic B-spline Curve
Nonuniform B-spline Curve
B-Spline Control
The control is achieved following common methods
•Changing the type of knot vector hence basis
function: periodic uniform, open uniform or non-
uniform
•Changing the order k of the basis functions
•Changing the number and position of the defining
polygon vertices
•Using multiple polygon vertices
•Using multiple knot values in the knot vector
B-Spline Control: Changing Number
and position of vertices
B-Spline Control: Repeating the
Number of vertices
B-Spline Control:
Closed – Non-uniform knot vector

a b

c d
Figure (a) shows an open B-spline curve of degree 3 defined by 10 (n
= 9) control points and a uniform knot vector.

In the figure, control point pairs 0 and 7, 1 and 8, and 2 and 9 are
placed close to each other to illustrate the construction.

Figure (b) shows the result of making control points 0 and 7


identical.

The shape of the curve does not change very much. Then, control
points 1 and 8 are made identical as shown in Figure (c).

It is clear that the gap between the first and last points of the curve is
closer.

Finally, the curve becomes a closed on when control points 2 and 9


are made identical as shown in Figure (d).
Note that B-Spines are designed to eliminate sharp corners,
as seen above.

A sharp corner can be obtained, however, by using


duplicate sequential control points.

Using three identical control points causes the curve to pass


through the point, as illustrated below.
Rational B-Spline
• Rational b-spline is a single precise
mathematical representation capable of
representing common analytical shapes –
lines, conic sections including circles, free-
form curves, quadric and sculptured surfaces
used in the CAD applications
• Non-uniform rational b-splines (NURBS) forms the
basis of initial graphics exchange specification
Rational B-Spline
n +1
Bi N i ,k (t ) n +1
P(t ) = i =1
n +1
= Bi Ri ,k (t ) h ≥ 0; t min ≤ t ≤ t max 2 ≤ k ≤ n +1
i =1
hi N i ,k (t )
i =1
hi N i ,k (t )
Ri ,k (t ) = n +1
h≥0
hi N i ,k (t )
i =1

• Definition: A rational b-spline curve is the


projection of a non rational (polynomial) b-spline
defined in 4-dimensional homogenous coordinate
space back into 3D space
Rational B-spline Curve
Rational B-spline Curve -NURBS
•The legs of the control triangle are of equal length (i.e. it is isosceles).
•The chord connecting the first and the last control points meets each
leg at an angle φ equal to half the angular extent of the arc.
•The weight of the inner control point is cos(φ ).
•The open uniform knot vector is [0,0,0,1,1,1].
Rational B-spline Curve -NURBS
We see below how to get a whole circle with only one NURBS.
The knot vectors are [0, 0, 0, 1/3, 1/3, 2/3, 2/3, 1, 1, 1] and [0, 0, 0,
1/4, 1/4, 1/2, 1/2, 3/4, 3/4, 1, 1, 1].

Você também pode gostar