home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Hack-Phreak Scene Programs
/
cleanhpvac.zip
/
cleanhpvac
/
CDEMO4SR.ZIP
/
OBJCALC.TXT
< prev
next >
Wrap
Text File
|
1994-06-01
|
3KB
|
140 lines
These are the calculations used for the various 3D objects used in this Intro.
For speed and size they are calculated once, and then written to a .BIN file
wich produced (using Binobj) the file Sxhmata.OBJ
const
CCMsg : Array[-3..3] of string[44]=
(' ... ... ... .. .. ... ... ',
'..... ..... ..... ... ... ..... ..... ',
'.. .. .. .. ....... .. .. .. ',
'.. .. .. .. .. . .. .. .. .. ',
'.. .. .. .. .. .. .. .. .. ',
'..... ..... ..... .. .. ..... ..... ',
' ... ... ... .. .. ... ... ');
Procedure CalcV1;
Var z : ShortInt;
i,l : Byte;
S,c : Integer;
begin
l:=1;
For z:=0 to 11 do
begin
For i:=0 to 12 do begin
S:=round(sin(2*I*pi/13)*23);
C:=round(Cos(2*I*Pi/13)*23);
Sxhmata[0][l,3]:=z*5-24;
Sxhmata[0][l,1]:=S;
Sxhmata[0][l,2]:=C;
inc(l);
end;
end;
end;
Procedure CalcV2;
Var z : ShortInt;
i,l : Byte;
S,c : Integer;
begin
l:=1;
For z:=0 to 7 do
begin
For i:=0 to 12 do begin
S:=round(sin(2*I*pi/13)*(15-(Cos(2*(z+4)*Pi/12)*15)));
C:=round(Cos(2*I*Pi/13)*(15-(Cos(2*(z+4)*Pi/12)*15)));
Sxhmata[1][l,3]:=z*5-24;
Sxhmata[1][l,1]:=S;
Sxhmata[1][l,2]:=C;
inc(l);
end;
end;
For z:=8 to 11 do
begin
For i:=0 to 12 do begin
S:=round(sin(2*I*pi/13)*((z-7)*(z-7)));
C:=round(Cos(2*I*Pi/13)*((z-7)*(z-7)));
Sxhmata[1][l,3]:=z*5-24;
Sxhmata[1][l,1]:=S;
Sxhmata[1][l,2]:=C;
inc(l);
end;
end;
end;
Procedure CalcV3;
Var z : ShortInt;
i,l : Byte;
S,c : Integer;
begin
l:=1;
For z:=0 to 11 do
begin
For i:=0 to 12 do begin
S:=round(sin(2*I*pi/13)*(Sin(2*Succ(z)*Pi/26)*30));
C:=round(Cos(2*I*Pi/13)*(Sin(2*Succ(z)*Pi/26)*30));
Sxhmata[2][l,3]:=Round(-Cos(2*Succ(z)*Pi/24)*28);
Sxhmata[2][l,1]:=S;
Sxhmata[2][l,2]:=C;
inc(l);
end;
end;
end;
Procedure CalcV4;
Var z : ShortInt;
i,l : Byte;
S,c : Integer;
begin
l:=1;
For z:=0 to 11 do
begin
For i:=0 to 12 do begin
S:=round(sin(2*I*pi/13)*(Sin(2*(z+8)*Pi/26)*28));
C:=round(Cos(2*I*Pi/13)*(Sin(2*(z+8)*Pi/26)*28));
Sxhmata[3][l,3]:=Round(-Cos(2*Succ(z)*Pi/24)*26);
Sxhmata[3][l,1]:=S;
Sxhmata[3][l,2]:=C;
inc(l);
end;
end;
end;
Procedure CalcV5;
Var z : ShortInt;
i,l : Byte;
S,c : Integer;
begin
l:=1;
For z:=0 to 11 do
begin
For i:=0 to 12 do begin
S:=round(sin(2*I*pi/13)*28);
C:=round(Cos(2*I*Pi/13)*(Sin(2*Succ(z)*Pi/26)*30));
Sxhmata[4][l,3]:=((z-6)*4)+(i DIV 3);
Sxhmata[4][l,1]:=S;
Sxhmata[4][l,2]:=C;
inc(l);
end;
end;
end;
Procedure CalcV6;
Var x,y,z : ShortInt;
i,l : Byte;
S,c : Integer;
begin
l:=1;
For x:=1 to 42 do
For y:=-3 to 3 do
IF CCMsg[y][x]='.' Then
begin
Sxhmata[5][l,3]:=-Round(Cos(2*(y+4)*pi/20)*20);
Sxhmata[5][l,1]:=-Round((Sin(2*(x)*Pi/120)*40)*Sin(2*(y+20)*Pi/100))+20 ; { x*2 }
Sxhmata[5][l,2]:=Round((Cos(2*(x)*Pi/120)*40)*Sin(2*(y+20)*Pi/100))-10 ; { y*2 }
inc(l);
end;
end;