-



         

- 13


Var

M, I, J, N1, Nt : Integer; MaxF, L, T, HI, Ht : Real;

Procedure Initialize; ( )

Var GraphDriver, GraphMode : Integer;

Begin

DetectGraph(GraphDriver, GraphMode) ;

InitGraph(GraphDriver, GraphMode, '');

End;

( )

Procedure Postar.ovka (U : Mas2; Nt, N1 : Integer; HI, L, MaxF : Real);

Var X_N, Shag, Y_N, Shir, Dlin, Color, I, J, K, Y : Integer;

Flag .: Boolean; Ff : String; Col : Array [0..15] Of Byte;

Begin

Initialize; ( )

X_N := GetMaxX Div 6;

If Nt <= 6 Then M := Nt Else M := Nt Div 2;

Y_N := GetMaxY Div M - 20; Shir := Y_N Div 2;

Dlin := GetMaxX -2 * X_N; Shag := Trunc(Dlin / N1); Str(Shag,Ff) ;

Col[0] := 0; Col[l] := 8; Col[2] := 1; ( )

Col[3] := 9; Col[4] := 3; Col[5] := 11;

Col[6] := 2; Col[7] := 10; Col[8] := 14;

Col[9] := 13; Col[l0] := 5; Col[ll] := 12; Col [12] := 4;

For I :== 0 To M - 1 Do ( )

Begin

For J := 0 To N1 - 1 Do ( )

Begin

Flag := False;

For := 0 To Shag Do

Begin

For y:= 0 To Shir Do

Begin

Color := 1 + Round((U[I, J] + ( )

(U[I, J + 1] - U[I, J]) * / Shag - U[0, 0]) / 3 * 16);

If Random(64) > 32

Then If Random(64) > 32 Then Color := Color + 1 Else

Color := Color - 1;

If Not Flag Then ( )

Begin

Str((U[I,J]+(U(I,J+l]-U[I,J])*K/Shag) : 5 : 3, Ff);

OutTextXY(K+X_N+Shag*J, Y_N*(1+1)-19, Ff) ;

Flag := True

End;

{ }

PutPixel(K+X_N+Shag*J, Y+Y_N*(1+I), Col[Color])

End

End

End

End;

SetColor(White); OutTextXY(150, 450, ' ');

Repeat Until KeyPressed; CloseGraph

End;

Begin ( )

L := 4; := 10; Hi := 1; Ht := 1;

N1 := Trunc(L / HI); Nt := Trunc(T / Ht); MaxF := 5;

Postanovka (U.Nt, N1, HI, L, MaxF)

End.