Professional Documents
Culture Documents
第7章 三维几何02-消隐算法
第7章 三维几何02-消隐算法
20021024 1
7.5
20021024 2
7.5.1
Min/Max
P2P3P2P1
P2P11>0
P11
P11
20021024 3
J
J1
J2Vi
Vj
20021024 4
J
J3DVi-1ViViVi+1
ViVjD=0
J2D>(<)0Vi
J4Vj
jSj
J5SJ6jS
1J4
J6D<0S
S
20021024 5
7.5.2
r
r
q
q
20021024 6
7.5.2
r XOY
1'5'6'7'3'4'1'S
XOY
r
20021024 7
7.5.2
r(1)
a
r(2)
(b,c,d)
r(3)
20021024 8
7.5.2
r(4)
r(5)
r(6)
20021024 9
7.5.3
r
3
q(1)
q(2)
q(3)
20021024 10
7.7.3
rP1P2
n
r? =E[ii[01]i=1,2, ,n]
r? =
ri1=min ? i2=max ?
20021024 11
7.7.3
r
1=max(0,i1)
2=min(1i2)
r
r
r1 2
20021024 12
7.6
r
r
r
r
r
r
r
20021024 13
7.7.1 1
r E13-45-8
r E21-1010-79-10
6-2
r E3
1-22-34-1 9-4 8-9
3-57-8 6-7
20021024 14
7.7.1 2
r E4
5-6
r
q E2E4
q E1E3
q E3
r E1E3
20021024 15
7.7.2 1
r
r
qP1(x1,y1,z1 )P2(x2,y2,z2)
qAx+By+Cz+D=0
20021024 16
7.7.2 1
r
D1= Ax1+By1+Cz1+D
D2= Ax2+By2+Cz2+D
r D1(D2)<0 -2
D1(D2)=0 N1(N2)= 0
D1(D2)>0 1
r N=N1+N2
20021024 17
7.7.2 2
r N-2 N=-2
qN=0
qN=-1
qN>0 N=1 N=2
20021024 18
7.7.2 3
r
q1) N>0
q2) N-2
20021024 19
7.7.2 4
q 3)N=-1=D1/ (D1+D2)
qN2<0[0,]
q[0,]
20021024 20
7.7.2 5
4)N=0
q
q
20021024 21
7.7.3 1
rP1P2
Q1Q2
x = x p1 + ( x p 2 x p1 )
y = y p1 + ( y p 2 y p1 )
z = z p1 + ( z p 2 z p1 )
x = x q1 + ( x q 2 x q1 )
y = y q1 + ( y q 2 y q1 )
z = z q1 + (z q 2 z q1 )
20021024 22
7.7.3 2
rXOY
S
P1P2 P
Q1 Q2 Q
XOY
ss
rs[0,1]
s [0,1]
20021024 23
7.7.3 3
rss
qzp=zp1 +(zp2-zp1 )s
qzq=zq1 +(zq2-zq1 )s
r
qzp > zq
P1P2Q1Q2
qzp = zq
P1P2Q1Q2
qzp < zq
P1P2Q1Q2
20021024 24
7.7.4
r
r
r
r
20021024 25
7.7.4
r01A12
[0,1][2,1]
q2[0,1][2,1]
20021024 26
7.7.4
r01B34
[0,3][4,1]
q2
q [0, 3][4,1]
20021024 27
7.7.4
r01AB
q3
q [0, 1] [2, 3] [4,1]
20021024 28
7.7.4
rRamda[]
q1
q2
20021024 29
7.7.5
N-1
N N
20021024 30
7.7.5
r AN-1 N-1
r aNN
r N
AN= AN-1aN
20021024 31
O
r O1 2i-1 2j-1 -1
2i 2j+1
r O2
r O3N0
r O4+1
O6
r O5 NN-1O4
r O6N=-2
NN+1
r O7O4
20021024 32
7.7.6
r
q
q
q
q
q
20021024 33
H
H1
H2
H3 H1H2
20021024 34
H
H4
0
H5
+(-)()+(-)
H6-+
H70[01]
20021024 35
7.7
20021024 36
7.8
r
1
12
r
qNbody
qNpoint
20021024 37
7.8.1
r
r
q14,710;
r
q1,5,6,8,9,11
r
r
20021024 38
7.8.2
r T
r for Np=1 to Npoint {
q NpT
r} //End of for Np
// Box8Box65
r for Nb=1 to Nbody {
q Box8
q NbBox8ZminZmax
q 7FsFe
q
q
r } //End of for Nb
20021024 39
7.8.2
rBox8
//
// 911
rfor Nb=1 to Nbody {
qfor Mb=Nb+1 to Nbody {
qBox8
Nb11
9
q} //End of for Mb
r} //End of for Nb
20021024 40
7.8.3
for Nb=1 to Nbody {
7NbFsFe
for Nf=Fs to Fe {
4NfLsLe
for Nl=Ls to Le {
3NlEsEe
for Ne=Es to Ee {
2NePsPe
Ps-Pe
} //End of for Ne
} //End of for Nl
} // End of for Nf
} // End of for Nb
20021024 41
7.8.4
//
rP1P2
r12
rax+by+c=0
r9
11BsBe
//11
20021024 42
7.8.4
r for Mb=Bs to Be {//
qif then continue
qif then continue
q7MbF1F2
q
q ;
r } // End of for Mb
20021024 43
r
r
r
r
K
r
r
20021024 44
20021024 45
20021024 46
20021024 47
20021024 48
//
qfor Nf=Fs to Fe {
q
q4NfLsLe
qNf5
q3Nf2Ps
Pe
qfor Np=Ps to Pe {
nNfBox6
q} //End of for Np
qBox6 NbBox8
q} //End of for Nf
20021024 49
//
qfor Mf=F1 to F2 {
qif then continue
qif then continue
qif then continue
q
qif then
q4MfL1L2
q
q
qif then continue//
q
q
qif then exit//
q} // End of for Mf
20021024 50
//
qfor Ml=L1 to L2 {
q3MlE1E2
qfor Me=E1 to E2 {
n2
nif then continue
n
ns;
ne;
nif e<-Eps or e>1.0+Eps then continue //
nif -Epss1.0+Eps then
q} //End of for Me
q} //End of for Ml
20021024 51