Civil Engineering Reference
In-Depth Information
If (U2-U1>V2-V1 and U2-U1>W2-W1) then //divide cell j in
//x-direction
Sort (left, right, P, X) //Sort points along x, assign corner
//points to cells n + 1 and n + 2
c = P m ; X1 n+1 = U1; X2 n+1 = X c ; Y1 n+1 = V1; Y2 n+1 = V2; Z1 n+1 = W1; Z2 n+1 = W2;
X1 n+2 = X c ; X2 n+2 = U2; Y1 n+2 = V1; Y2 n+2 = V2; Z1 n+2 = W1; Z2 n+2 = W2;
else
if (V2-V1>W2-W1) then
//divide cell j in y-direction
Sort (left, right, P, Y) //Sort points along y, assign corner
//points to cells n + 1 and n + 2
c = P m ; X1 n+1 = U1; X2 n+1 = U2; Y1 n+1 = V1; Y2 n+1 = Y c ; Z1 n+1 = W1; Z2 n+1 = W2;
X1 n+2 = U1; X2 n+2 =U2; Y1 n+2 = Y c ; Y2 n+2 = V2; Z1 n+2 = W1; Z2 n+2 = W2;
else //divide cell j in z-direction
Sort (left, right, P, Z) //Sort points along z, assign corner
//points to cells n + 1 and n + 2
c = P m ; X1 n+1 = U1; X2 n+1 = U2; Y1 n+1 = V1; Y2 n+1 = V2; Z1 n+1 = W1; Z2 n+1 = Z c ;
X1 n+2 = U1; X2 n+2 = U2; Y1 n+2 = V1; Y2 n+2 = V2; Z1 n+2 = Z c ; Z2 n+2 = W2;
endif
Endif
k = k + 1; Q k = c
// median node assign to Q k
n = n + 1; L n = left; R n = m - 1
n = n + 1; L n = m + 1; R n = right
End loop j }
J1 = J2 + 1; J2 = n;
Loop j = J1, J2
left = L j ; right = R j
k = k + 1; Q k = 0
// Q k = 0, for cells
// containing no point
if (left = right) Q k = P left // assign Q k for cells with
// one point
End loop j }
Search WWH ::




Custom Search