Example 1

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

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) 

Table-1: Control points


P0,0 P1,0 P2,0 P0,1 P1,1 P2,1 P0,2 P1,2 P2,2 P0,3 P1,3 P2,3

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:

(a) Cutter Contact Point = PCC = S(u = 0.2, v = 0.8) = ?

(b) Cutter Location Point = PCL = ?

S(u  0.2, v  0.8)

Solution:

(a) Cutter Contact Point

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
 

Basis functions of degree two in u-direction at u = 0.2

p = 2 = degree of the surface in u-direction

U  [0 0 0 1 1 1]
u0 u1 u2 u3 u4 u5

Table-2: Tree structure of basis functions

p=0 p=1 p=2

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

Table-3: Values of basis functions

p=0 p=1 p=2

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
 

Basis functions of degree three in v-direction at v = 0.8

q = 3 = degree of the surface in v-direction

V= [ 0 0 0 0 1 1 1 1 ]
v0 v1 v2 v3 v4 v5 v6 v7

Table-4: Tree structure of basis functions

p=0 p=1 p=2 p=3

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

Table-5: Values of basis functions

p=0 p=1 p=2 p=3

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

CC-Point on the surface (PCC)

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 

 x(u  0.2, v  0.8)   0.6579 


PCC   y (u  0.2, v  0.8)    2.4994 
 z (u  0.2, v  0.8)   0.0158

(b) Cutter Location Point PCL

 xCL (u , v) 
PCL   yCL (u , v)   S(u, v)  r.n(u , v)  PCC  r.n(u , v) (4a)
 zCL (u , v) 

Where:

r = cutter radius = 10 mm;

 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.

Calculate new control points Pi(1,0)


,j :

 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.

p=0 p=1 p=2

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

It gives following table without calculating the basis functions again.

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.

Calculate new control points Pi(0,1)


,j :

 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)

0  7.1371 0 

 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

basis functions, simply use table-4 & 5.

p=0 p=1 p=2 p=3

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

 xCL (u , v)   0.6579   0.9904   10.5621 


PCL  
  yCL (u , v)   PCC  r.n(u , v)   2.4994   10.  0.1327  =  1.1724 
 
 zCL (u , v)   0.0158  0.0380   0.3959 

--------------------------------------------------------End------------------------------------------------------------------

You might also like