<< >>


.

( )

 

ALFF

1. , (s1,s2,s3), (n1,n2,n3), s1 OX, s2 OY, s3 OZ; n1,n2,n3 .

2. :

ALFF(sl,s2,s3,n1,n2,n3,a);

3. , :

s1,s2,s3 real, OX,OY,OZ;

n1,n2,n3 real, OX,OY,OZ;

real, .

4. :

procedure ALFF( sl,s2,s3,n1,n2,n3 : Re; var a : Re);

begin

a:=(s1*n1+s2*n2+s3*n3)/Sqrt((Sqr(s1)+Sqr(s2)+Sqr(s3))*(Sqr(n1)+Sqr(n2)+Sqr(n3)));

end;{ ALFF }

 

ALFO

1.

(X0,Y0,Z0) (,Ynp,Znp) .

2. :

ALFO(XYZ0,XYZ1,);

3. :

XYZ0 array [1..3] of real, XYZ0 X0,Y0,Z0;

XYZ1 array [1..3] of real, XYZ1 ,Ynp,Znp;

array [1..4, 1..4] of real, .

4. :

procedure ALFO( XYZ0,XYZ1 : mr_3; var M : mr_4_4);

label

1,2;

var

sf,cf,sa,ca,x,y,xr,yr : Re;

ib,i,j : Int;

begin

for i:=l to 4 do

for j:=1 to 4 do M[i,j]:=0;

for ib:=l to 3 do

begin

M[ib,ib]:=-1;

M[4,ib]:=XYZ0[ib];

end;

if (XYZ0[1]=XYZ1[1])AND(XYZ0[2]=XYZ1[2]) then goto 1;

sf:=0;

for j:=l to 3 do

sf:=sf+Sqr(XYZ0[j]XYZ1[j]);

sf:=Abs(XYZ0[3]XYZ1[3])/Sqrt(sf);

cf:=Sqrt(1Sqr(sf));

x:=XYZ1[1]XYZ0[l];y:=XYZ1[2]XYZ0[2];

xr:=Abs(x)/Sqrt(Sqr(x)+Sqr(y));yr:=Abs(y)/Sqrt(Sqr(x)+Sqr(y));

if (x<=0)AND(y<0) then

begin sa:=xr;ca:=yr, goto 2; end;

if (x<0)AND(y>=0) then

begin sa:=xr;ca:=-yr; goto 2; end;

if (x>=0)AND(y>0) then

begin sa:=-xr;ca:=-yr, goto 2; end;

sa:=-xr;ca:=yr;

2: M[1,1]:=-ca; M[1,2]:=sa; M[2,1]:=-sa*sf; M[2,2]:=-ca*sf;

M[2,3]:=cf; M[3,l]:=-sa*cf; M[3,2]:=-ca*cf; M[3,3]:=-sf;

1:

M[4,4]:=l;

end;{ ALFO }

 

ALLIPS

( KVADR)

1.

(X11)/(11Xf)=(YY11)/(Y11Yf)=(ZZ11)/(Z11Zf);

(XX0)**2/a**2+(YY0)**2/b**2+(ZZ0)**2/c**2l=0.

, (X11,Y11,Z11) (Xf,Yf,Zf), - .

2. :

ALLIPS(T,A11,AL,ANS2,INDEX);

3. :

TF array [1..3] of real, TF=[Xf,Yf,Zf];

A11 array [1..3] of real, A11=[X11,Y11,Z11];

AL array [1..2, 1..3] of real;

ANS2 array [1..2, 1..3] of real;

INDEX - integer, ,

4. :

procedure ALLIPS(,11 : mr_3; AL : mr_2_3;

var Ans2 : mr_2_3; var Index : Int);

var

xz,yz,yy,xx,aa,ba,da : Re;

i,j : Int;

{.: mr_3 rr[1..3] of real,

mr_2_3 array[1..2,1..3] of real,

Re real,

Int integer.}

begin

for i:=l to 2 do

for j:=l to 3 do

Ans2[i,j]:=0;

xx:=A11[3]-T[3];

xz:=(A11[1]-T[1])/xx;

yz:=(A11[2]-T[2])/xx;

xx:=A11[1]-AL[1,1]; :=11[2]-L[1,2];

AA:=Sqr(AL[2,3]*AL[2,1]*yz)+Sqr(AL[2,1]*AL[2,2])+

Sqr(AL[2,3]*AL[2,2]*xz);

:=2*(11[3]*Sqr(AL[2,3]*AL[2,1]*yz)

+Sqr(AL[2,3]*AL(2,l])*yz*yy

AL[l,3]*Sqr(AL[2,l]*AL[2,2])

A11[3]*Sqr(AL[2,2]*AL[2,3]*xz)

+Sqr(AL[2,2]*AL[2,3])*xz*xx);

DA:=Sqr(AL[2,3]*AL[2,1]*(A11[3]*yzyy))

+Sqr(AL[2,3]*AL[2,2]*(A11[3]*xzxx))

+Sqr(AL[2,l]*AL[2,2])*(Sqr(AL[l,3])-Sqr(AL[2,3]));

KVADR(aa,ba,da,Index, Ans2[1,3],Ans2[2,3]);

if Index=2 then Exit;

Ans2[1,1]:=(Ans2[1,3]A11[3])*xz+A11[1];

Ans2[1,2]:=(Ans2[1,3]A11[3])*yz+A11[2];

Ans2[2,1]:=(Ans2[2,3]A11[3])*xz+A11[1];

Ans2[2,2]:=(Ans2[2,3]A11[3])*yz+A11[2];

end;{ ALLIPS }

 

ALLOID

( ALLIPS, NA8FIR, SOME, PLOS)

1. (XF,YF,ZF) , . , . .

2. :

ALLOID(T,F,ALL,FS,XYZ,IND,NORM);

3. , :

rr[1..3] of real. , ;

F array[1..3] of real. , ;

ALL - rr[1..2,1..3] of real. :

(Ֆ0)**2/**2+(YY0)**2/b**2+(ZZ0)**2/**21=0;

;

FS rr[1..4,1..2] of real. , : A1*X+B1*Y+C1*Z+D1=0 A2*X+B2*Y+C2*Z+D2=0. .

;

XYZ rr[1..3] of real. ;

IND integer, ,

NORM array[1..3] of real. . .

4. :

Procedure ALLOID(T,F : mr_3; ALL : mr_2_3; FS : mr_4_2;

var XYZ : mr_3; var Ind : Int; var NORM : mr_3);

var

P1 : mr_SM_3;

ANS : mr_2 3;

, : mr_4_1;

i,j : Int;

{.: mr_3 array[1..3] of real,

mr_2_3 array[1..2,1..3] of real,

mr_4_2 array[1..4,1..2] of real,

mr_SM_3 array[1..4,1..3] of real,

mr_4_l array[1..4,1] of real,

Int integer.}

begin

for i:=l to 4 do KAK[i,l]:=0;

KTO:=KAK;KTO[3,l]:=l;KTO[4,l]:=-1;

ALLIPS(F,T,ALL,ANS,Ind);

if Ind=2 then Exit;

for i:=1 to 3 do

begin

P1[l,i]:=ANS[l,i];

P1[2,i]:=ANS[2,i];

end;

for i:=l to 4 do KAK[i,1]:=FS[i,l];

PLOS(T,F,KAK,XYZ,Ind);

for i:=l to 3 do P1[3,i]:=XYZ[i];

if Ind=0 then Exit;

for i:=l to 4 do KAK[i,1]:=FS[i,2];

PLOS(T,F,KAK,XYZ,Ind);

for i:=l to 3 do P1[4,i]:=XYZ[i];

if Ind=0 then Exit;

for i:=1 to 4 do KAK[i,1]:=0;

for i:=1 to 2 do

if ((FS[1,1]*P1[i,1]+FS[2,l]*P1[i,2]+FS[3,1]*P1[i,3]+FS[4,1])>=0)

AND

((FS[1,2]*P1[i,l]+FS[2,2]*P1[i,2]+FS[3,2]*P1[i,3]+FS[4,2])>=0)

then KAK[i,1]:=l;

for i:=3 to 4 do

begin

j:=5-i;

if ((FS[1,j]*P1[i,1]+FS[2,j]*P1[i,2]+FS[3,j]*P1[i,3]+FS[4,j])>=0)

AND

((Sqr((P1[i,1]ALL[1,1])/ALL[2,1])+

Sqr((P1[i,2]ALL[1,2])/ALL[2,2])+

Sqr((P1[i,3]ALL[1,3])/ALL[2,3])-1)<=0)

then KAK[i,1]:=1;

end;

i:=4;

NA8FIR(P1,KT,KAK,F,I,J);

if J=0 then

begin

Ind:=0;

Exit;

end;

for i:=l to 3 do XYZ[i]:=P1[J,i];

Ind:=1;

if KTO[J,1]=l then

begin

for i:=1 to 3 do NORM[i]:=FS[i,1];

Exit;

end;

if KTO[J,1]=-l then

begin

for i:=1 to 3 do NORM[i]:=FS[i,2]; Exit;

end;

for i:=l to 3 do

NORM[i]:=-(XYZ[i]ALL[1,i])/Sqr(ALL[2,i]);

end;{ - ALLOID -}

 

AVTOZON

1. , . , . .

2. :

AVTOZON (SKR,N,,_KR).

3. , :

SKR array [1..SM,1..2,1..MKT] of real. SKR , MKT , SM X,Y. SM, MKT . SKR ( );

N integer, ;

integer, ;

.: N<=SM, <=.

_KR array [1..SM,1..2,1..MKT] of real, _KR -, . , , i+1, i, (b,Yb,Zb) : (XbXi+l)(Yi+lYi)(Xi+1Xi)(YbYi+1)>0.

4. :

procedure AVTOZON(SKR : mr_SM_2_MKT; N,M : Int;

var _KR : mr_SM 2 MKT); var i,j,k : Int;

{. mr_SM_2_MKT-array[1..SM,1..2,1..MKT] of real,

Int integer}

begin for i:=1 to (N-1) do

for j:=1 to 2 do

for k:=1 to M do

_KR[i,j,k]:=SKR[i+1,j,k]SKR[i,j,k];

for j:=1 to 2 do

for k:=1 to M do

_KR[Nj,k]:=SKR[lj,k]SKR[N,j,k];

for i:=l to M do

if ((SKR[3,1,i]SKR[1,1,i])*_KR[1,2,i]

(SKR[3,2,i]SKR[1,2,i])*_KR[1,1,i])<0

then

for j:=1 to N do

for k:=1 to 2 do

_KR[j,k,i]:=-_KR[j,k,i];

end;{ - AVTOZON -}

 

ETTA

1. ETTA , .

2. :

BETTA(n1,n2,n3,s1,s2,s3,r1,r2,r3,q).

3. , :

n1,n2,n3 real, OX,OY,OZ. ;

s1,s2,s3 real, , ;

r1,r2,r3 real, , ;

q real, .

4. :

procedure (n1,n2,n3,s1,s2,s3,r1,i2,r3 : Re; var q : Re );

begin

q:=(s1*n1+s2*n2+s3*n3)/(Sqr(n1)+Sqr(n2)+Sqr(n3)); q:=(r1*(2.0*n1*qs1)+r2*(2.0*n2*qs2)+r3*(2.0*n3*qs3))/

Sqrt((Sqr(r1)+Sqr(r2)+Sqr(r3))*

(Sqr(2.0*n1*qs1)+Sqr(2.0*n2*qs2)+Sqr(2.0*n3*qs3)));

end;{ - TT - }

 

CILIND

( PLOS, KVADR, NA8FIR, SOME, PRESS)

1. , . (Xf,Yf,Zf), . , . .

2. :

CILIND(F,S,R,T11,TF,GOT,WHAT,NORA).

3. , :

F array [1..3] of real. F X, Y, Z ;

S array [1..3] of real. F X, Y, Z ;

R real. R ;

T11 array [1..3] of real. T11 X11, Y11, Z11 , ;

TF array [1..3] of real. TF X11, Y11, Z11 () , ;

GOT array [1..3] of real. GOT , X, Y, Z;

WHAT integer, . WHAT=1, , WHAT=0, ;

NORA array [1..3] of real. (GOT) , OY, OZ. .

4. .

Z11>=Zf(T11[3]>=TF[3]) .

5. :

procedure CILIND(F,S : mr_3;R : Re; T11,TF: mr_3;

var GOT : mr_3; var WHAT : Int; var NORA : mr_3);

var

ABC : mr_3;

XZ,YZ,XX,YY,Lola,Stom,A,B,C : Re;

P1 : mr_SM_3;

WHO,,FIR,SEK : mr_4_l;

N,I,J,Jop : Int;

{.: mr_3 array[1..3) of real,

mr_SM_3 array[1..4,1..3] of real,

mr_4_l array[1..4,1] of real,

Re real,

Int integer.}

Begin

N:=4;

WHO[1,1]:=0;WHO[2,1]:=0;WHO[3,1]:=1;WHO[4,1]:=1;

for i:=l to 3 do ABC[i]:=S[i]F[i];

Lola:=0;

for i:=1 to 3 do LoIa:=Lola+Sqr(ABC[i]);

Lola:=Sqrt(Lola);

for i:=l to 3 do ABC[i]:=ABC[i]/Lola;

XX:=T11[1]-F[1]; YY:=T11[2]F[2];

XZ:=(T11[1]TF[1])/(T11[3]TF[3]);

YZ:=(T11[2]TF[2])/(T11[3]TF[3]);

Lola:=ABC[l]*XZ+ABC[2]*YZ+ABC[3];

Stom:=-T11[3]*(ABC[1],XZ+ABC[2],YZ)ABC[3]*F[3]+

ABC[1]*XX+ABC[2]*YY;

A:=Sqr(XZ)+Sqr(YZ)+lSqr(Lola);

if A=0 then

begin

WHAT:=0;

Exit;

end;

B:=2*(-Sqr(XZ)*T11[3]+XZ*XXSqr(YZ)*T11[3]+

YZ*YYF[3]Lola*Stom);

C:=Sqr(XZ*T11[3]XX)+Sqr(YZ*T11[3]YY)+

Sqr(F[3])Sqr(Stom)Sqr(R);

KVADR(A,B,C,WHAT,P1[1,3],P1[2,3]);

if WHAT=2 then

begin

WHAT:=0;

Exit;

end;

for i:=1 to 3 do

FIR[i,1]:=ABC[i];

FIR[4,1]:=ABC[1]*F[1]ABC[2]*F[2]ABC[3]*F[3];

for i:=l to 4 do SEK[i,1]:=-FIR[i,1];

SEK[4,1]:=ABC[1]*S[1]+ABC[2]*S[2]+ABC[3]*S[3];

PLOS(T11,TF,FIR,GOT,WHAT);

if WHAT=0 then Exit;

for i:=l to 3 do P1[3,i]:=GOT[i];

PLOS(T11,TF,SEK,GOT,WHAT);

for i:=1 to 3 do P1[4,i]:=GOT[i];

for i:=1 to 2 do

begin

DIRECT(T11,TF,P1[i,3],GOT);

for j:=1 to 3 do P1[i,j]:=GOT[j];

end;

for i:=1 to 2 do

if ((P1[i,1]*FIR[1,1]+P1[i,2]*FIR[2,1]+

P1[i,3]*FIR[3,1]+FIR[4,1])>=0)

AND

((P1[i,1],SEK[1,1]+P1[i,2]*SEK[2,1]+

P1[i,3]*SEK[3,1]+SEK[4,1])>=0)

then KAK[i,1]:=l

else KAK[i,1]:=0;

for i:=3 to 4 do

if (Sqr(P1[i,1]F[l])+Sqr(P1(i,2]F[2])+Sqr(P1[i,3]F(3])

-Sqr(ABC[l]*(P1[i,1]F[1]+ABC[2]*(P1[i,2]F[2])+

ABC[3]*(P1[i,3]F[3]))Sqr(R))<=0

then KAK[i,1]:=l

else KAK[i,1]:=0;

NA8FIR(P1,WHO,KAK,TF,N,Jop);

if Jop=0 then

begin

WHAT:=0;

Exit;

end;

for i:=1 to 3 do GOT[i]:=P1[Jop,i];

WHAT:=1;

if WHO[Jop,1]=l then

begin

NORA: = ABC;

Exit;

end;

Lola:=0;

for i:=1 to 3 do

Lola:=Lola+ABC[i]*(GOT[i]F[i]);

for i:=1 to 3 do

NORA[i]:=GOT[i]F[i]ABC[i]*Lola;

end;{ - CILIND - }

 

DIRECT

1. Z . (X1,Y1,Z1) (2,Y2,Z2).

2. :

DIRECT(A,,Z,XYZ);

3. :

array [1..3] of real, (X1,Y1,Z1), ;

array [1..3] of real, (2,Y2,Z2).

Z real, Z ;

XYZ array [1..3], .

4. : Z1≠Z2.

5. :

procedure DIRECT(A,B : mr_3; Z : Re; var XYZ : mr_3);

{ .: mr_3 array[1..3] of real, Re real, Int integer}

var

i : Int;

begin

XYZ[1]:=(ZA[3])*(A[1]B[1])/(A[3]B[3])+A[1];

XYZ[2]:=(Z-A[3])*(A[2]B[2])/(A[3]B[3])+A[2];

XYZ[3]:=Z;

end;{ - DIRECT - )

 

2

1. , () () ().

2. :

E2(b,ca,cb,n,cg,a,r,ed,ez,et,t);

3. , :

b real, , b=[0,1];

real, ;

cb real, ;

n integer, , n=[1,200];

cg real, ( );

real, ( ), =[0,1];

r real, , r=[0,1];

ed real, , (=1);

ez real, , (r=1);

et real, ;

t real, , t=1 , t=0 .

: ed,ez,et , ed+ez+et=1.

4. :

procedure E2(var b: Re;ca,cb: Re;n: Int;cg,a,r,ed,ez,et,t : Re);

function Step(cb : Re; n : Int): Re;

var

: Re;

begin

c:=l; if n>0 then

repeat

c:=c*cb; Dec(n); until n=0; Step:=c; end;

begin

if cb>0.05 then b:=(t*ez*r*Step(cb,n)+a*ct*0.5*(l+cg)+ed*ca*a*t)

else b:=a*et*0.5*(1+cg) +ed*ca*a*t;

end;{ - E2 -}

 

KONYS

( PICA, DIRECT, NASFIR)

1. (XF,YF,ZF) ( ) , , .

2.

KONYS(T,F,KON,FS,XYZ,Ind,Norm).

3. , :

rr[1..3] of real. T=[X1,Y11,Z11] , ;

F rr[1..3] of real. F=[XF,YF,ZF] , ;

KON rr[1..2,1..3] of real.

(. PICA);

FS rr[1..4,1..2] of real.

A1*X+B1*Y+C1*Z+D1=0 A2*X+B2*Y+C2*Z+D2=0 , , ;

XYZ array [1..3] of real, ;

IND integer, ,

NORM array[1..3] of real. N OX,OY,OZ. .

4. .

.

5. :

procedure KONYS( T,F : mr_3; KON : mr_2_3; FS : mr_4_2;

var XYZ : mr_3; var Intd : Int; var NORM : mr_3);

var P : mr_SM_3;

, : mr_4_l;

i,j,k : Int;

{.: mr_3 array[1..3] of real, mr_2_3 array[1..2,1..3] of real, mr_4_2 array[1..4,1..2] of real, mr_SM_3 array[1..4,1..3] of real, mr_4_l array[1..4,l] of real, Int integer.}

begin for i:=l to 4 do KAK[i,l]:=0;

KTO:=KAK;

KTO[3,1]:=1;KTO[4,l]:s=1;

PICA(T,F,KON,P[1,3],P[2,3],Ind);

if Ind=0 then Exit;

for i:=1 to 2 do

begin

DIRECT(T,F,P[i,3],XYZ);

for j:=1 to 3 do P[i,j]:=XYZ[j];

end;

for i:=1 to 2 do

begin

for j:=1 to 4 do KAK[j,1]:=FS[j,i];

PLOS(T,F,KAK,XYZ,Ind);

if Ind=0 then Exit;

j:=i+2;

for k:=1 to 3 do P[j,k]:=XYZ[k];

end;

for i:=1 to 4 do KAK[i,1]:=0;

for i:=1 to 2 do

if (FS[1,1]*P[i,1]+FS[2,1]*P[i,2]+FS[3,1]*P[i,3]+FS[4,1]>=0)

AND (FS[1,2]*P[i,1]+FS[2,2]*P[i,2]+FS[3,2]*P[i,3]+FS[4,2]>=0)

then KAK[i,1]:=1;

for i:=3 to 4 do

if (Sqr(P[i,1]KON[1,1])/KON[2,l]+

Sqr(P[i,2]KON[1,2])/KON[2,2]+

Sqr(P[i,3]KON[1,3])/KON[2,3])<=0

then

KAK[i,1]:=1;

i:=4;

NA8FIR(P,KTO,KAK,F,i,j);

if j=0 then

begin

Ind:=0;

Exit;

end;

for i:=1 to 3 do XYZ[i]:=P[j,i];

Ind:=1;

if [j,1]<>0 then

for i:=1 to 3 do NORM[i]:=FS[i,1]

else for i:=1 to 3 do NORM[i]:=(XYZ[i]KON[1,i])/KON[2,i];

end;{ - KONYS - }

 

ROB

( PLOS, SOME, YESNO)

1. , . (X1,Y1,Z1) (2,Y2,Z2). (2,Y2,Z2). KUBB, (), ,,,D +BY+CZ+D=0. , .

: Z1 Z2.

2. :

KOROB(T1,2,KUBB,XYZ,NORM,ANT).

3. :

1 array [1..3] of real, T1[X1,Y1,Z1] , ;

2 array [1..3] of real, 2[2,Y2,Z2] , ;

KUBB array [1..4, 1..6] of real, , ;

XYZ array [1..3] of real, (X,Y,Z) (2,Y2,Z2) ;

NORM rr [1..3] of real, OX, OY, OZ;

ANT integer, ,

4. :

procedure KOROB(1,2 : mr_3; KUBB : mr_4_6;

var XYZ,NORM : mr_3; var Ant: Int);

var

SOV : array[1..6,1..3] of Re;

BUF : mr_SM_3;

WHO : array[1..6] of Int;

KUBA: mr_4_l;

i,j,k,jor,an1,nom : Int;

{.: mr_3 array[1..3] of real,

mr_4_6 array[1..4,1..6] of real,

mr_SM_3 array[1..4,1..3] of real,

mr_4_l array[1..4,1] of real,

Int integer, Re real.}

begin

j:=0;

for i:=1 to 6 do

begin

KUBA[1,1]:=KUBB[1,i];

KUBA[2,1]:=KUBB[2,i];

KUBA[3,1]:=KUBB[3,i];

KUBA[4,1]:=KUBB[4,i];

PLOS(T1,T2,KUBA,XYZ,ANT);

if Ant=1 then

begin

YESNO(XYZ,KUBB,An1);

if An1=1 then

begin

j:=j+1;

WHO[j]:=i;

for k:=1 to 3 do

SOV[j,k]:=XYZ[k];

end;

end;

end;

if j=0 then

begin

Ant:=0; Exit;

end;

Ant:=1;

for i:=1 to 4 do

for k:=l to 3 do

BUF[i,k]:=SOV[i,k];

SOME(BUF,T2,j,Jor);

for i:=1 to 3 do

XYZ[i]:=SOV[Jor,i];

j:=WHO[Jor];

for i:=1 to 3 do

NORM[i]:=KUBB[i,j];

end;{ - KOROB - }

 

KRILO

( PLOS, YNZONA)

1. . ( ) , X Y, Y Z, Z X.

2. :

KRILO(P2,NOR_,,F,,YN,XYZ,Proek);

3. :

2 array [l..SM_2,1..2] of real, , 2, (N).

.

() ;

NOR_ array [l..SM_2,1..2], , . 2, N. , 2. , , , 2, . .

, ;

, ;

, ;

T array [1..3] of real, , T=[X Y Z];

F array [1..3] of real, , F = [Xf Yf Zf];

P array [1..4] of real, , , +BY+CZ+D=0;

YN integer, ,

XYZ array [1..3] of real, ;

Proek integer, ,

4. :

procedure KRILO(P2,NOR_ : mr_SM_2; N : Int;T,F : mr_3; P : mr_4_l;

var YN : Int; var XYZ : mr_3; Proek : Int);

var

T2 : array[1..2] of Re;

i,j,k1,k2 : Int;

{.: mr_3 array[1..3] of real,

mr_4_l array[1..4,1] of real,

mr_SM_2 array[l..SM,1..2] of real,

Int integer, Re real.}

begin

if Proek=l then begin k1:=1;k2:=2; end;

if Proek=2 then begin K1:=2;K2:=3; end;

if Proek=3 then begin k1:=3;K2:=1; end;

PLOS(T,F,P,XYZ,YN);

if YN=0 then Exit;

T2[1]:=XYZ[k1];T2[2]:=XYZ[k2];

YNZONA(P2,NOR_,N,T2[1],T2[2],YN);

end;{ - KRILO - }

 

KVADR

1. ***2+*+=0.

2. :

KVADR(A,B,C,Ind,X1,X2).

3. , :

real, .

real, .

real, .

1 real, .

2 real, .

Ind real, :

4. :

procedure KVADR(A,B,C : Re; var Intd : Int; var X1,X2 : Re);

var

V: Re;

begin

V:=Sqr(B)4*A*C;

if (V<0)or(A=0) then

begin

Intd:=2;

Exit;

end

else

begin

V:=Sqrt(V);

X1:=(b+V)/(2*A);

X2:=(BV)/(2*A);

end;

if V=0 then Intd:=0

else Intd:=1;

end;{ - KVADR - }

 

MMGG

1. A[K,L]*B[L,M]. [,].

2. :

MMGG(A,B,K,L,M,C);

3. , :

array[1..K,1..L] of real. *=;

array[1..L,1..M] of real. *=;

array[1..K,1..M] of real. *=;

K,L,M byte, . 256.

4. :

, L, , 256.

5. :

procedure MMGG(MA,MB : mr_SM_SM; k,l,m : By; var MC : mr_SM_SM);

var

i,j,n : Int;

{.: mr_SM_SM array[1..SM,1..SM] of real,

by byte,

Int integer.}

begin

for i:=1 to k do

for j:=l to m do

MC[i,j]:=0;

for i:=1 to k do

for j:=l to m do

for n:=l to 1 do

MC[i,j]:=MC[i,j]+MA[i,n]*MB[nj];

end;{ - MMGG - }

 

NA8FIR

( PRESS, SOME)

1. , , , (). , .

2. :

NA8FIR(T,WHO,,TF,N,JO).

3. :

array [1..SM_3,1..3] of real, , .

.

3. . ;

WHO array [1..4] of real, , : , WHO[l,1]=1, , , WHO[l,1]=0, ;

array [1..4] of real, , . . , [1,1]=1, , [1,1]=0, , ;

TF rr [1..3] of real, . TF=(Xf,Yf,Zf);

N integer, , WHO, , . , , ;

JOP integer, , JOP=0, , JOP=1 , JOP=N N- .

4. :

procedure NA8FIR(var : mr_SM_3; var WHO, : mr_4_l;

TF : mr_3; var N,Jop : Int);

label

1;

var

ii,jj,i,k,j : Int;

BUF : mr_SM_3;

{.: mr_3 array[1..3] of real,

mr_SM_3 array[1..4,1..3] of real,

mr_4_l array[1..4,1] of real,

Int - integer.}

begin

Jop:=0;

if SUMMR_4_1(KAK)=0 then Exit;

k:=l;

1: for i:=k to N do

if KAK[i,1]=0 then

begin

PRESSMR_4_1(KAK,i,N);N:=N+1;

PRESSMR_4_1(WHO,i,N);N:=N+1;

for ii:=1 to 4 do

for jj:=1 to 3 do

BUF[ii,jj]:=T[ii,jj];

PRESSMR_SM_3(BUF,i,N);

for ii:=1 to 4 do

for jj:=1 to 3 do

T[ii,jj]:=BUF[ii,jj];

goto 1;

end

else

begin

k:=k+1;

goto 1;

end;

for i:=1 to 4 do

for j:=1 to 3 do

BUF[i,j]:=T[i,j];

SOME(BUF,TF,N,Jop);

for i:=1 to 4 do

for j:=1 to 3 do

T[i,j]:=BUF[i,j];

end;{ - NA8FIR - }

function SUMMR_4_1(Mat : mr_4_l):Re;

var

i,j : Int;

S : Re;

begin

S:=0;

for i:=1 to 4 do

S:=S+Mat[i,1];

SUMMR_4_1:=S;

end;{ - SUMMR_4_1 -}

procedure PRESSMR_SM_3(var A : mr_SM_3; L : Int; var N : Int);

var

i,j : Int;

begin

N:=N1;

for i:=1 to N do

if i>=L then

A[i]:=A[i+l];

end;{ - PRESSMR_SM_3 - }

procedure PRESSMR_4_1(var A : mr_4_l; L : Int; var N : Int);

var

i,j : Int;

begin

N:=N1;

for i:=l to N do

if i>=L then

A[i,1]:=A[i+1,1];

end;{ - PRESSVEC4_1 - }

 

OPTIMA

( OBMEN,PRESS)

1. - .

2. :

OPTIMA(A,n,Indic);

3. , :

array[1..NT,1..2] of real. , .

.

SM . . , N ;

N integer. , , N<=SM. N / . ;

Indic integer. : I=1, ; I=0, ( ).

4. :

n .

5. :

procedure OPTIMA(var : mr_SM_2; var n.lndik : Int);

label

1,4,5;

var

ij,r,s,k,m,ans,stand : Int;

{.: mr_SM_2 array[1..SM,1..2] of real,

int integer.}

begin

indik:=1;

s:=0;j:=1;

1: k:=0;

for i:=2 to n do

begin

m:=0;

for r:=2 to n do

begin

ans:=SIGN((A[r,1]A[j,1])*(A[i,2]A[j,2])

(A[i,1]A[j,1]*(A[r,2]A[j,2]));

if ans=0 then goto 4;

m:=m+1;

if m=l then stand:=ans;

if ans<>stand then goto 5;

end;

if m=0 then goto 5;

s:=s+1; k:=i;

OBMEN(A,n);

if s=n then Exit;

goto 1;

5: end;

if k=0 then

begin

PRESSMR_SM_2(A,j,n);

if n=2 then

begin

Indik:=0;

Exit;

end;

goto 1;

end;

end;{ - OPTIMA - }

procedure PRESSMR_SM_2(var A : mr_SM_2; L : Int; var N : Int);

var

i,j : Int;

begin

N:=N1;

for i:=1 to N do

if i>=L then

A[i]:=A[i+1];

end;{ - PRESSMR_SM_2 - }

procedure OBMEN(var A : mr_SM_2; var nr : Int);

var

: array[1..2] of Re;

i,j : Int;

begin

for i:=1 to 2 do B[i]:=A[1,i];

for i:=1 to nr1 do

for j:=1 to 2 do

A[i,j]:=A[i+1,j);

for i:=1 to 2 do

A[nr,i]:=b[i];

end;{ - OBMEN - }

 

PICA

( KVADR).

1. Z1 Z2 : F(X,Y,Z)=0, F(X,Y,Z)=(X0)**2/+(YY0)**2/B+(ZZ0)**2/C, , , 1, .

2. :

PICA(T1,2,KON,Z1,Z2,INDI);

3. :

1 array[1..3] of real, 1=(X11,Y11,Z11] ( ), ( );

2 array[1..3] of real, 2=(Xf,Yf,Zf] ( ), ( );

KON array [1..2,1..3] of real, . . X0,Y0,Z0, ,, ;

Z1 real, ;

Z2 real, ;

INDI integer, , INDI=1, , INDI=0, .

4. :

procedure PICA(1,2 : mr_3; KON : mr_2_3;

var Z1,Z2 : Re; var Indi : Int);

var

XYZ : mr_3;

NORM : array[1..2] of Re;

A : Int;

begin

NORM[1]:=(T1[3]T2[3]);

NORM[2]:=(T1[2]T2[2])/NORM[1];

NORM[1]:=(T1[1]T2[1])/NORM[1];

XYZ[1]:=KON[2,2]*KON[2,3]*Sqr(NORM[1])+

KON[2,1]*KON[2,3]*Sqr(NORM[2])+

KON[2,1]*KON[2,2];

XYZ[2]:=2*(KON[2,2]*KON[2,3]*NORM[1]*((T1[1]KON[1,1])

T1[3]*NORM[1])+KON[2,1]*KON[2,3]*NORM[2]*((T1[2]

KON[l,2])T1[3]*NORM[2])KON[2,1]*KON[2,2]*KON[1,3]);

XYZ[3]:=KON[2,1]*KON[2,3]*Sqr(T1[3]*NORM[2](T1[2]KON[1,2]))+

KON[2,2]*KON[2,3]*Sqr(T1[3]*NORM[1](T1[1]KON[1,1]))+

KON[2,1]*KON[2,2]*Sqr(KON[1,3]);

KVADR(XYZ[1],XYZ[2],XYZ[3],A,Z1,Z2);

if A=2 then Indi:=0

else Indi:=1;

end;{ - PICA - }

 

PLOS

( DIRECT)

1. . X1, Y1, Z1 2, Y2, Z2. , , , D +BY+CZ+D=0. : Z1¹Z2.

2. :

PLOS(T1,2,,XYZ,FLAG).

3. :

1 array [1..3] of real, 1 (X1,Y1,Z1), ;

2 array [1..3] of real, 2 (X2,Y2,Z2), ;

array[1..4] of real, -, , , , D ( );

XYZ array[1..3] of real, XYZ , X, Y, Z;

FLAG integer, , FLAG=1, , FLAG=0, .

4. :

procedure PLOS(1,2 : mr_3; : mr_4_l; var XYZ : mr_3;

var Flag : Int);

var

Znam : Re;

{.: mr_3 array[1..3] of real,

mr_4_l array[1..4,1] of real,

Int - integer.}

begin

Znam:=P[1,1]*(T1[1]T2[1])+P[2,1]*(T1[2]T2[2])+P[3,1]*

(T1[3]T2[3]);

if Znam=0 then

begin

Flag:=0; Exit;

end;

Flag:=1;

XYZ[3]:=T1[3]+(T1[3]T2[3])*

(-P[1,1]*T1[1]P[2,1]*T1[2]P[3,1]*T1[3]P[4,1])/Znam;

DIRECT(T1,T2,XYZ[3],XYZ);

end;{ - PLOS - }

 

PL3T

1. +BY+CZ+D=0 .

2. :

PL3T(T0,1,2,).

3. :

0 array[1..3] of real, X, Y, Z ;

1 array[1..3] of real, ;

2 array[1..3] of real, ;

array[1..4] of real, - A, , , D .

4. :

procedure PL3T(,, : mr_3; var : mr_4_l);

var

i: Int;

{.: mr_3 array[1..3] of real,

mr_4_l array[1..4,1] of real,

Int integer.}

begin

for i:=1 to 3 do

begin

B[i]:=B[i]A[i];

C[i]:=C[i]A[i];

end;

P[1,1]:=B[2]*C[3]C[2]*B[3];

P[2,1]:=-B[1]*C[3]+C[1]*B[3];

P[3,1]:=B[1]*C[2]C[1]*B[3];

[4,1]:=-[1]*[1,1]+[2]*[2,1][3]*[3,1];

end;{ - PL3T - }

 

PLOS

( DIRECT)

1. . X1,Y1,Z1 2,Y2,Z2. , , , D +BY+CZ+D=0. : Z1¹Z2.

2. :

PLOS(T1,2,,XYZ,FLAG);

3. :

1 array[1..3] of real, 1 (X1,Y1,Z1), ;

2 array[1..3] of real, 2 (2,Y2,Z2), ;

array[1..4] of real, -, , , , D ( );

XYZ array[1..3] of real, XYZ , X, Y, Z;

FLAG integer, , FLAG=1, , FLAG=0, .

4. :

procedure PLOS(1,2 : mr_3; : mr_4_l; var XYZ : mr_3;

var Flag : Int);

var

Znam : Re;

{.: mr_3 array[1..3] of real,

mr_4_l array[1..4,1] of real,

Int - integer.}

begin

Znam:=P[l,l]*(T1[1]T2[1])+P[2,l]*(T1[2]T2[2])+P[3,1]*

(T1[3]T2[3]);

if Znam=0 then

begin

Flag:=0; Exit;

end;

Flag:=1;

XYZ[3]:=T1[3]+(T1[3]T2[3])*

(-P[1,1]*T1[1]P[2,1]*T1[2]P[3,1]*T1[3]-P[4,1])/Znam;

DIRECT(T1,T2,XYZ[3],XYZ);

end;{ - PLOS - }

 

PRESSMR_SM_3, PRESSMR_4_1,PRESSMR_SM_2

, , , OPTIMA. . OPTIMA.

 

SOME

1. , , , , . N*3, N . X, Y, Z . N L (L<=N).

2. :

SOME(AB,TF,MAB,JOP);

3. :

array[1..N,1..3] of real, . N*3 N ;

TF array [1..3] of real, TF - X, Y, Z ;

MAB integer, , L , ;

JOP integer, , .

4. :

procedure SOME(AB : mr_SM_3;TF : mr_3; mab : Int; var Jop : Int);

var

plo,pla : Re;

i : Int;

begin

Jop:=1;

pla:=Abs(TF[3]AB[1,3]);

for i:=2 to mab do

begin

plo:=Abs(TF[3]AB[i,3]);

if plo<pla then

begin

pla:=plo;

Jop:=i;

end;

end;

end;{ - SOME - }

 

YESNO

1. (X,Y,Z) , - .

2. :

YESNO (A,PL,KRIT).

3. , :

array[1..3] of real. X, Y, Z , ;

PL array [1..4,1..6] of real. PL , :

.

i- (i=1(1)6) AiX+BiY+CiZ+D=0.

KRIT integer, , KRIT=1, , KRIT=0 .

4. : , 0,003. , .

5. :

procedure YESNO( : mr_3; PL : mr_4_6; var Krit : Int);

var

: Re;

i: Int;

{.: mr_3 array[1..3] of real,

mr_4_6 array[1..4,1..6] of real,

Re real,

Int integer.}

begin

Krit:=l;

for i:=l to 6 do

begin

B:=PL[1,i]*A[1]+PL[2,i]*A[2]+PL[3,i]*A[3]+PL[4,i];

if <-0.003 then

begin

Krit:=0;

Exit;

end;

end;

end;{ YESNO - }

 

YNZONA

1. , .

2. :

YNZONA(A,NOR_,N,X,Y,YN);

3. , :

array[1..2,1..NN] of real. . : X,Y . N , N+1 . N<=NN;

NOR_ array[1..2,1..NN] of real. , 1 2, 2 3,...,N N+1 . , OY. N<=NN;

N integer, A,NOR_;

X real, X ;

Y real, Y ;

YN integer, . YN=1, , YN=0 , .

4. :

, (XXi)(YiYi) (YYi)(XiXi) , i- i+1- , 0,003. , .

5. :

procedure YNZONA(A,NOR_ : mr_SM_2; N : Int; X,Y : Re;

var YN : Int);

var

i: Int;

{.: mr_SM_3 array[1..2,1..3] of real,

Int integer, Re real.}

begin

YN:=1;

for i:=l to N do

if ((XA[i,1])*NOR_[i,2](YA[i,2])*NOR_[i,1])<-0.003 then

begin

YN:=0;

Exit;

end;

end;{ - YNZONA - }

 



<< >>