Example 1
Example 1
Example 1
n = 2; m = 3; p = 2; q = 3
U [0 0 0 1 1 1]
V [0 0 0 0 1 1 1 1]
2 3
S(u, v) Ni ,2 (u )N j ,3 (v)Pi, j 0 u, v 1
i 0 j 0
N 0,3 (v)
x(u , v) P0,0 P0,1 P0,2 P0,3
N1,3 (v)
S(u , v) y (u , v) N 0,2 (u ) N1,2 (u ) N 2,2 (u ) P1,0 P1,1 P1,2 P0,3 (1)
N 2,3 (v)
z (u , v) P2,0 P2,1 P2,2 P2,3
N3,3 (v)
x 0 2 4 0 2 4 -0.5784 2 4 0 2 4
y 0 -0.1197 0 1 1 1 2.5216 1.7683 2 3 3 3
z 0 -0.2543 0 0 2.1247 0 0 -0.6543 0 0 0 0
Determine:
Solution:
To calculate a point (cutter contact point) on the surface we have to find out all basis functions in u and v
direction.
Basis Functions
1 if ui u < ui+1
Ni ,0 (u ) (2)
0 Otherwise
u ui ui p +1 u
Ni , p (u ) Ni , p 1 (u ) Ni +1, p 1 (u ) (3)
ui p ui ui+ p+1 ui
U [0 0 0 1 1 1]
u0 u1 u2 u3 u4 u5
u0 u1 0 0 N0,0
N0,1
u1 u2 0 0 N1,0 N0,2
N1,1
u2 u3 0 1 N2,0 N1,2
N2,1
u3 u4 1 1 N3,0 N2,2
N3,1
u4 u5 1 1 N4,0
By using Eq-2 the first column (p = 0) of the above table can be calculated and the remaining columns (p
> 0) are calculated using Eq-3. The calculated values are shown in table-3
u0 u1 0 0 0
0
u1 u2 0 0 0 0.64
0.8
u2 u3 0 1 1 0.32
0.2
u3 u4 1 1 0 0.04
0
u4 u5 1 1 0
V= [ 0 0 0 0 1 1 1 1 ]
v0 v1 v2 v3 v4 v5 v6 v7
v0 v1 0 0 N0,0
N0,1
v1 v2 0 0 N1,0 N0,2
N1,1 N0,3
v2 v3 0 0 N2,0 N1,2
N2,1 N1,3
v3 v4 0 1 N3,0 N2,2
N3,1 N2,3
v4 v5 1 1 N4,0 N3,2
N4,1 N3,3
v5 v6 1 1 N5,0 N4,2
N5,1
v6 v7 1 1 N6,0
By using Eq-2 the first column (p = 0) of the above table can be calculated and the remaining columns (q
> 0) are calculated using Eq-3. The calculated values are shown in table-5
v0 v1 0 0 0
0
v1 v2 0 0 0 0
0 0.008
v2 v3 0 0 0 0.04
0.2 0.096
v3 v4 0 1 1 0.32
0.8 0.384
v4 v5 1 1 0 0.64
0 0.512
v5 v6 1 1 0 N4,2
0
v6 v7 1 1 0
Put the values of all control points and basis function in Eq-1 to calculate the point on the surface (PCC).
0.008
0 0 0.5784 0
0.096
x(u 0.2, v 0.8) 0.64 0.32 0.04 2 2 2 2 0.6579
0.384
4 4 4 4
0.512
0.008
0 1 2.5216 3
0.096
y (u 0.2, v 0.8) 0.64 0.32 0.04 0.1197 1 1.7683 3 2.4994
0.384
0 1 2 3
0.512
0.008
0 0
0.096
0 0
z (u 0.2, v 0.8) 0.64 0.32 0.04 0.2543 2.1247 0.6543 0 0.0158
0.384
0 0 0 0
0.512
xCL (u , v)
PCL yCL (u , v) S(u, v) r.n(u , v) PCC r.n(u , v) (4a)
zCL (u , v)
Where:
N x (u , v)
N x (u , v) N y (u , v)2 N z (u , v) 2
2
nx
Su (u , v) S v (u , v) N y (u , v)
n(u , v) ny (4b)
Su (u , v) S v (u , v)
n N x (u , v) N y (u , v) N z (u , v)
2 2 2
z
N z (u , v)
N x (u , v) N y (u , v) N z (u , v)
2 2 2
PCC = Cutter contact point which has already been calculated in previous part.
The only remaining thing is the unit normal vector at u = 0.2 and v = 0.8
For normal vector the surface Eq-1 needs to be partially differentiated w.r.t. u and v
Partial differentiation w.r.t. u (Su(u,v))
1 3
Su (u, v) Ni ,1 (u )N j ,3 (v)Pi(1,0)
,j 0 u, v 1 (5)
i 0 j 0
After differentiation w.r.t. u we need to calculate new control points and new basis functions in
u-direction.
Pi(0,0) (0,0)
1, j Pi , j
Pi(1,0) p (6)
ui p +1 ui +1
,j
Note: While calculating the new control points use original degree p and original knot vector.
Using Eq-6, the knot vector U, degree p = 2, and the control points in table-1, the new control
points are calculated as follows:
4
P1,0 P0,0 P1,0 P0,0
(1,0)
P0,0 2 2 2(P1,0 P0,0 ) 0.2394
u0+2+1 u0+1 1- 0 0.5087
4
P2,0 P1,0 P2,0 P1,0
(1,0)
P1,0 2 2 2(P2,0 P1,0 ) 0.2394
u1+2+1 u1+1 1- 0 0.5087
4
P1,1 P0,1 P1,1 P0,1
(1,0)
P0,1 2 2 2(P1,1 P0,1 ) 0
u0+2+1 u0+1 1- 0 4.2494
4
P2,1 P1,1 P2,1 P1,1
(1,0)
P1,1 2 2 2(P2,1 P1,1 ) 0
u1+2+1 u1+1 1- 0 4.2494
5.1567
P1,2 P0,2 P1,2 P0,2
(1,0)
P0,2 2 2 2(P1,2 P0,2 ) 1.5066
u0+2+1 u0+1 1- 0 1.3085
4
P2,2 P1,2 P2,2 P1,2
(1,0)
P1,2 2 2 2(P2,2 P1,2 ) 0.4634
u1+2+1 u1+1 1- 0 1.3085
4
P1,3 P0,3 P1,3 P0,3
(1,0)
P0,3 2 2 2(P1,3 P0,3 ) 0
u0+2+1 u0+1 1- 0 0
4
P2,3 P1,3 P2,3 P1,3
(1,0)
P1,3 2 2 2(P2,3 P1,3 ) 0
u1+2+1 u1+1 1- 0 0
Now we can rewrite Eq-5 with new control points, new knot vector, and new degree as:
1 3
Su (u, v) Ni ,1 (u )N j ,3 (v)Pi(1,0)
,j 0 u, v 1 (7)
i 0 j 0
U’= [ 0 0 1 1 ]
u0 u1 u2 u3
p=1 ; n = 1.
Calculate new basis functions in u-direction:
For new basis functions we use the new knot vector U’. Basically we do not need to calculate the
basis function again because we have already calculated them in previous part. To get the new
basis functions simply delete the shaded region in the following table.
u0 u1 0 0 N0,0
N0,1
u1 u2 0 0 N1,0 N0,2
N1,1
u2 u3 0 1 N2,0 N1,2
N2,1
u3 u4 1 1 N3,0 N2,2
N3,1
u4 u5 1 1 N4,0
Table-6
p=0 p=1
u0 u1 0 0 N0,0
N1,1
u1 u2 0 1 N1,0
N2,1
u2 u3 1 1 N2,0
Table-7
p=0 p=1
u0 u1 0 0 0
0.8
u1 u2 0 1 1
0.2
u2 u3 1 1 0
Partial differentiation w.r.t. v (Sv(u,v))
2 2
Sv (u, v) Ni ,2 (u )N j ,2 (v)Pi(0,1)
,j 0 u, v 1 (8)
i 0 j 0
After differentiation w.r.t. v we need to calculate new control points and new basis functions in
v-direction.
Pi(0,0) (0,0)
1, j Pi , j
Pi(0,1) q (9)
v j q +1 v j +1
,j
Using Eq-9, the knot vector V, degree q = 3, and the control points in table-1, the new control
points can be calculated in the same way as it was done for u-direction:
The result of those control points is given below:
0 0 0
(0,1)
P0,0 3 P1,0 3.3591 P2,0 3
(0,1) (0,1)
1.7351 0 0
(0,1)
P0,1 4.5648 P1,1 2.3049 P2,1 3
(0,1) (0,1)
0 8.3369 0
1.7351 0 0
(0,1)
P0,2 1.4352 P1,2 3.6951 P2,2 3
(0,1) (0,1)
0 1.9628 0
Now we can rewrite Eq-8 with new control points, new knot vector V’, and new degree as:
2 2
Sv (u, v) Ni ,2 (u )N j ,2 (v)Pi(0,1)
,j 0 u, v 1 (9)
i 0 j 0
V’= [ 0 0 0 1 1 1 ]
v0 v1 v2 v3 v4 v5
q=2 ; m = 2.
Calculate new basis functions in v-direction using V’ and q = 2:
For new basis functions we use the new knot vector V’. Again we do not need to calculate the
v0 v1 0 0 N0,0
N0,1
v0 v2 0 0 N1,0 N0,2
N1,1 N0,3
v2 v3 0 0 N2,0 N1,2
N2,1 N1,3
v3 v4 0 1 N3,0 N2,2
N3,1 N2,3
v4 v5 1 1 N4,0 N3,2
N4,1 N3,3
v5 v6 1 1 N5,0 N4,2
N5,1
v6 v7 1 1 N6,0
Table-8
p=0 p=1 p=2
v0 v1 0 0 0
0
v1 v2 0 0 0 0.04
0.2
v2 v3 0 1 1 0.32
0.8
v3 v4 1 1 0 0.64
0
v4 v5 1 1 0
Calculate PCL:
Using Eq-7
4.3553
Su (u 0.2, v 0.8) 0.4284
0.0592
Using Eq-9
0.3553
S v (u 0.2, v 0.8) 2.7553
0.3604
Using Eq-4b
0.9904
n(u 0.2, v 0.8) 0.1327
0.0380
Using Eq-4a
--------------------------------------------------------End------------------------------------------------------------------