Category : Printer + Display Graphics
Archive   : SPIN.ZIP
Filename : JET.PAS

 
Output of file : JET.PAS contained in archive : SPIN.ZIP
Program Jet;

(* This program generates an AcroSpin file called JET.FIL that displays a *)
(* fighter jet. I wrote this program using Turbo Pascal Version 3.0. You *)
(* can modify the colors by changing the constants in the next section. *)
(* *)
(* David B. Parker *)
(* January 4, 1988 *)

(* Constants. *)

Const
WingColor = 10; (* Color of the wings. *)
EngineColor = 9; (* Color of the fore part of the engines. *)
MidEngColor = 4; (* Color of the mid part of the engines. *)
BurnerColor = 12; (* Color of the rear part of the engines. *)
FuselageColor = 7; (* Color of the fuselage. *)
CanopyColor = 11; (* Color of the canopy. *)
USAColor = 15; (* Color of USA. *)

(* Variables. *)

Var I, J, K : Integer; (* Looping variables. *)
SinAngle: Real; (* Sine of angle. *)
CosAngle: Real; (* Cosine of angle. *)
Sign : Real; (* Plus or minus one to indicate sign. *)
IntakeXHi: Real; (* Upper x coordinate of air intake. *)
IntakeXLo: Real; (* Lower x coordinate of air intake. *)
IntakeYHi: Real; (* Upper y coordinate of air intake. *)
IntakeYLo: Real; (* Lower y coordinate of air intake. *)
IntakeZHi: Real; (* Upper z coordinate of air intake. *)
IntakeZLo: Real; (* Lower z coordinate of air intake. *)
A : Real; (* Miscellaneous temporary variable. *)
B : Real; (* " " " *)
X : Real; (* " " " *)
R : Real; (* " " " *)
S : Char; (* Indicates port or starboard side of jet. *)
Output : Text; (* Output file. *)

(* Include the subroutine for writing text. *)

{$I WRITETEX.PAS}

(* Prepare the output file for writing. *)

Begin
Assign(Output,'JET.FIL');
Rewrite(Output);

(* Write out the end points for the wings. *)

For I := 0 To 1 Do
Begin
Sign := 2.0*I-1.0;
If I = 0 Then S := 'S' Else S := 'P';
Writeln(Output,'EndPoint Z ',Round(1536.0*Sign*4.75),
' Y ',Round(1536.0*0.34375),
' X ',Round(-1536.0*13.40625),
' Name ',S,'W0');
Writeln(Output,'EndPoint Z ',Round(1536.0*Sign*4.25),
' Y ',Round(1536.0*0.3125),
' X ',Round(-1536.0*14.5),
' Name ',S,'W1');
Writeln(Output,'EndPoint Z ',Round(1536.0*Sign*1.375),
' Y ',Round(1536.0*0.5),
' X ',Round(-1536.0*4.9375),
' Name ',S,'W2');
Writeln(Output,'EndPoint Z ',Round(1536.0*Sign*0.625),
' Y ',Round(1536.0*0.5),
' X ',Round(-1536.0*4.9375),
' Name ',S,'W3');
Writeln(Output,'EndPoint Z ',Round(1536.0*Sign*0.625),
' Y ',Round(1536.0*0.625),
' X ',Round(-1536.0*8.5),
' Name ',S,'W4');
Writeln(Output,'EndPoint Z ',Round(1536.0*Sign*1.75),
' Y ',Round(1536.0*0.46875),
' X ',Round(-1536.0*11.5),
' Name ',S,'W5');
Writeln(Output,'EndPoint Z ',Round(1536.0*Sign*0.625),
' Y ',Round(1536.0*0.46875),
' X ',Round(-1536.0*11.5),
' Name ',S,'W6');
End;

(* Write out the lines for the wings. *)

For I := 0 To 1 Do
Begin
If I = 0 Then S := 'S' Else S := 'P';
Writeln(Output,'Line From ',S,'W2 To ',S,'W0 Color ',WingColor);
Writeln(Output,'Line From ',S,'W0 To ',S,'W1 Color ',WingColor);
End;

(* Write out the end points for the engines. *)

For I := 0 To 1 Do
Begin
Sign := 2.0*I-1.0;
If I = 0 Then S := 'S' Else S := 'P';
For J := 0 To 7 Do
Begin
SinAngle := Sin(2.0*J*Pi/8.0);
CosAngle := Cos(2.0*J*Pi/8.0);
Writeln(Output,'Endpoint',
' Z ',Round(1536.0*Sign*(1.1875+0.4*CosAngle)),
' Y ',Round(1536.0*0.4*SinAngle),
' X ',Round(-1536.0*14.75),
' Name ',S,J,'E0');
Writeln(Output,'Endpoint',
' Z ',Round(1536.0*Sign*(1.1875+0.4375*CosAngle)),
' Y ',Round(1536.0*0.4375*SinAngle),
' X ',Round(-1536.0*14.25),
' Name ',S,J,'E1');
Writeln(Output,'Endpoint',
' Z ',Round(1536.0*Sign*(1.1875+0.5625*CosAngle)),
' Y ',Round(1536.0*0.5625*SinAngle),
' X ',Round(-1536.0*13.3125),
' Name ',S,J,'E2');
If J <> 3 Then
Writeln(Output,'Endpoint',
' Z ',Round(1536.0*Sign*(1.1875+0.5625*CosAngle)),
' Y ',Round(1536.0*0.5625*SinAngle),
' X ',Round(-1536.0*11.0),
' Name ',S,J,'E3')
Else
Writeln(Output,'Endpoint',
' Z ',Round(1536.0*Sign*(1.1875-0.5625)),
' Y ',Round(1536.0*0.5625),
' X ',Round(-1536.0*11.0),
' Name ',S,J,'E3')
End;
IntakeXHi := 1.375;
IntakeXLo := 0.625;
IntakeYHi := 0.5;
IntakeYLo := -0.25;
IntakeZHi := 7.125;
IntakeZLo := 4.9375;
Writeln(Output,'EndPoint',
' Z ',Round(1536.0*Sign*IntakeXHi),
' Y ',Round(1536.0*(IntakeYHi+IntakeYLo)/2.0),
' X ',Round(-1536.0*(IntakeZHi+IntakeZLo)/2.0),
' Name ',S,'0E5');
Writeln(Output,'EndPoint',
' Z ',Round(1536.0*Sign*IntakeXHi),
' Y ',Round(1536.0*IntakeYHi),
' X ',Round(-1536.0*IntakeZLo),
' Name ',S,'1E5');
Writeln(Output,'EndPoint',
' Z ',Round(1536.0*Sign*(IntakeXHi+IntakeXLo)/2.0),
' Y ',Round(1536.0*IntakeYHi),
' X ',Round(-1536.0*IntakeZLo),
' Name ',S,'2E5');
Writeln(Output,'EndPoint',
' Z ',Round(1536.0*Sign*IntakeXLo),
' Y ',Round(1536.0*IntakeYHi),
' X ',Round(-1536.0*IntakeZLo),
' Name ',S,'3E5');
Writeln(Output,'EndPoint',
' Z ',Round(1536.0*Sign*IntakeXLo),
' Y ',Round(1536.0*(IntakeYHi+IntakeYLo)/2.0),
' X ',Round(-1536.0*(IntakeZHi+IntakeZLo)/2.0),
' Name ',S,'4E5');
Writeln(Output,'EndPoint',
' Z ',Round(1536.0*Sign*IntakeXLo),
' Y ',Round(1536.0*IntakeYLo),
' X ',Round(-1536.0*IntakeZHi),
' Name ',S,'5E5');
Writeln(Output,'EndPoint',
' Z ',Round(1536.0*Sign*(IntakeXLo+IntakeXHi)/2.0),
' Y ',Round(1536.0*IntakeYLo),
' X ',Round(-1536.0*IntakeZHi),
' Name ',S,'6E5');
Writeln(Output,'EndPoint',
' Z ',Round(1536.0*Sign*IntakeXHi),
' Y ',Round(1536.0*IntakeYLo),
' X ',Round(-1536.0*IntakeZHi),
' Name ',S,'7E5');
End;

(* Write out the lines for the engines. *)

For I := 0 To 1 Do
Begin
If I = 0 Then S := 'S' Else S := 'P';
For J := 0 To 7 Do
Begin
K := J+1;
If K = 8 Then K := 0;
Writeln(Output,'Line From ',S,J,'E5 To ',S,K,'E5 Color ',EngineColor);
If (J Mod 2) = 1 Then
Writeln(Output,'Line From ',S,J,'E5 To ',S,J,'E3 Color ',EngineColor);
Writeln(Output,'Line From ',S,J,'E3 To ',S,K,'E3 Color ',EngineColor);
Writeln(Output,'Line From ',S,J,'E3 To ',S,J,'E2 Color ',EngineColor);
Writeln(Output,'Line From ',S,J,'E2 To ',S,K,'E2 Color ',EngineColor);
Writeln(Output,'Line From ',S,J,'E2 To ',S,J,'E1 Color ',MidEngColor);
Writeln(Output,'Line From ',S,J,'E1 To ',S,K,'E1 Color ',MidEngColor);
Writeln(Output,'Line From ',S,J,'E1 To ',S,J,'E0 Color ',BurnerColor);
Writeln(Output,'Line From ',S,J,'E0 To ',S,K,'E0 Color ',BurnerColor);
End;
Writeln(Output,'Line From ',S,'2E3 To ',S,'W1 Color ',WingColor);
End;

(* Write out the end points for the tail wings. *)

For I := 0 To 1 Do
Begin
Sign := 2.0*I-1.0;
If I = 0 Then S := 'S' Else S := 'P';
Writeln(Output,'EndPoint Z ',Round(1536.0*Sign*1.75),
' Y ',Round(1536.0*0.0),
' X ',Round(-1536.0*11.8125),
' Name ',S,'TW0');
Writeln(Output,'EndPoint Z ',Round(1536.0*Sign*4.34375),
' Y ',Round(-1536.0*0.15625),
' X ',Round(-1536.0*14.75),
' Name ',S,'TW1');
Writeln(Output,'EndPoint Z ',Round(1536.0*Sign*3.6875),
' Y ',Round(-1536.0*0.125),
' X ',Round(-1536.0*15.25),
' Name ',S,'TW2');
Writeln(Output,'EndPoint Z ',Round(1536.0*Sign*1.84375),
' Y ',Round(-1536.0*0.125),
' X ',Round(-1536.0*14.875),
' Name ',S,'TW3');
End;

(* Write out the lines for the tail wings. *)

For I := 0 To 1 Do
Begin
If I = 0 Then S := 'S' Else S := 'P';
Writeln(Output,'Line From ',S,'TW0 To ',S,'TW1 Color ',WingColor);
Writeln(Output,'Line From ',S,'TW1 To ',S,'TW2 Color ',WingColor);
Writeln(Output,'Line From ',S,'TW2 To ',S,'TW3 Color ',WingColor);
Writeln(Output,'Line From ',S,'TW3 To ',S,'0E1 Color ',WingColor);
End;

(* Write out the end points for the tail fins. *)

For I := 0 To 1 Do
Begin
Sign := 2.0*I-1.0;
If I = 0 Then S := 'S' Else S := 'P';
Writeln(Output,'EndPoint Z ',Round(1536.0*Sign*1.1875),
' Y ',Round(1536.0*0.5625),
' X ',Round(-1536.0*12.09375),
' Name ',S,'TF0');
Writeln(Output,'EndPoint Z ',Round(1536.0*Sign*1.34375),
' Y ',Round(1536.0*2.5625),
' X ',Round(-1536.0*14.15625),
' Name ',S,'TF1');
Writeln(Output,'EndPoint Z ',Round(1536.0*Sign*1.34375),
' Y ',Round(1536.0*2.5625),
' X ',Round(-1536.0*15.15625),
' Name ',S,'TF2');
Writeln(Output,'EndPoint Z ',Round(1536.0*Sign*1.1875),
' Y ',Round(1536.0*0.5625),
' X ',Round(-1536.0*14.5),
' Name ',S,'TF3');
End;

(* Write out the lines for the tail fins. *)

For I := 0 To 1 Do
Begin
If I = 0 Then S := 'S' Else S := 'P';
Writeln(Output,'Line From ',S,'TF0 To ',S,'TF1 Color ',WingColor);
Writeln(Output,'Line From ',S,'TF1 To ',S,'TF2 Color ',WingColor);
Writeln(Output,'Line From ',S,'TF2 To ',S,'TF3 Color ',WingColor);
Writeln(Output,'Line From ',S,'TF3 To ',S,'2E2 Color ',WingColor);
End;
WriteText(USAColor,1536.0*0.40,1536.0*0.40,4.5,0.0,0.0,
-1536.0*14.5,1536.0*1.7,1536.0*1.2764,'U');
WriteText(USAColor,1536.0*0.40,1536.0*0.40,4.5,0.0,0.0,
-1536.0*14.0,1536.0*1.3,1536.0*1.2451,'S');
WriteText(USAColor,1536.0*0.40,1536.0*0.40,4.5,0.0,0.0,
-1536.0*13.7,1536.0*0.9,1536.0*1.2139,'A');

(* Write out the end points for the fuselage. *)

Writeln(Output,'EndPoint Z 0 Y 0 X 0 Name FU4');
Writeln(Output,'EndPoint Z 0',
' Y ',Round(1536.0*7.0/16.0),
' X ',Round(-1536.0*0.875),
' Name FU7');
Writeln(Output,'EndPoint Z 0',
' Y ',Round(-1536.0*4.0/16.0),
' X ',Round(-1536.0*0.875),
' Name FU8');
Writeln(Output,'EndPoint Z 0',
' Y ',Round(1536.0*0.8125),
' X ',Round(-1536.0*2.3125),
' Name FU9');
Writeln(Output,'EndPoint Z 0',
' Y ',Round(1536.0*0.5625),
' X ',Round(-1536.0*11.0),
' Name FU10');
Writeln(Output,'EndPoint Z 0',
' Y ',Round(1536.0*1.3125),
' X ',Round(-1536.0*5.375),
' Name FU11');
Writeln(Output,'EndPoint Z 0',
' Y ',Round(1536.0*1.28125),
' X ',Round(-1536.0*3.375),
' Name FU12');
Writeln(Output,'EndPoint Z 0',
' Y ',Round(1536.0*1.40625),
' X ',Round(-1536.0*4.125),
' Name FU13');
Writeln(Output,'EndPoint Z 0',
' Y ',Round(1536.0*1.375),
' X ',Round(-1536.0*4.875),
' Name FU14');
Writeln(Output,'EndPoint Z 0',
' Y ',Round(-1536.0*0.3125),
' X ',Round(-1536.0*2.5),
' Name FU17');
For I := 0 To 1 Do
Begin
Sign := 2.0*I-1.0;
If I = 0 Then S := 'S' Else S := 'P';
Writeln(Output,'EndPoint Z ',Round(1536.0*Sign*0.625),
' Y ',Round(1536.0*0.125),
' X ',Round(-1536.0*15.25),
' Name ',S,'FU0');
Writeln(Output,'EndPoint Z ',Round(1536.0*Sign*0.625),
' Y ',Round(-1536.0*0.3125),
' X ',Round(-1536.0*2.5),
' Name ',S,'FU1');
Writeln(Output,'EndPoint Z ',Round(1536.0*Sign*0.625),
' Y ',Round(1536.0*0.875),
' X ',Round(-1536.0*5.25),
' Name ',S,'FU2');
Writeln(Output,'EndPoint Z ',Round(1536.0*Sign*Sqr(0.625)/0.875),
' Y ',Round(1536.0*0.625),
' X ',Round(-1536.0*2.375),
' Name ',S,'FU3');
A := 0.875/0.625;
R := 11.0/32.0;
B := 3.0/32.0;
X := (A*B+Sqrt((1+Sqr(A))*Sqr(R)-Sqr(B)))/(1+Sqr(A));
Writeln(Output,'EndPoint Z ',Round(1536.0*Sign*X),
' Y ',Round(1536.0*A*X),
' X ',Round(-1536.0*0.875),
' Name ',S,'FU5');
A := IntakeYLo/0.625;
R := 11.0/32.0;
B := 3.0/32.0;
X := (A*B+Sqrt((1+Sqr(A))*Sqr(R)-Sqr(B)))/(1+Sqr(A));
Writeln(Output,'EndPoint Z ',Round(1536.0*Sign*X),
' Y ',Round(1536.0*A*X),
' X ',Round(-1536.0*0.875),
' Name ',S,'FU6');
Writeln(Output,'EndPoint Z ',Round(1536.0*Sign*0.625/0.875*0.796875),
' Y ',Round(1536.0*0.796875),
' X ',Round(-1536.0*4.25),
' Name ',S,'FU15');
Writeln(Output,'EndPoint Z ',Round(1536.0*Sign*0.5),
' Y ',Round(1536.0*1.2),
' X ',Round(-1536.0*4.1875),
' Name ',S,'FU16');
End;

(* Write out the lines for the fuselage. *)

Writeln(Output,'Line From SFU0 TO PFU0 Color ',FuselageColor);
Writeln(Output,'Line From FU4 TO FU7 Color ',FuselageColor);
Writeln(Output,'Line From FU7 TO FU9 Color ',FuselageColor);
Writeln(Output,'Line From FU4 TO FU8 Color ',FuselageColor);
Writeln(Output,'Line From FU10 TO FU11 Color ',FuselageColor);
Writeln(Output,'Line From FU9 TO FU12 Color ',CanopyColor);
Writeln(Output,'Line From FU12 TO FU13 Color ',CanopyColor);
Writeln(Output,'Line From FU13 TO FU14 Color ',CanopyColor);
Writeln(Output,'Line From FU11 TO FU14 Color ',CanopyColor);
Writeln(Output,'Line From FU17 TO FU8 Color ',FuselageColor);
Writeln(Output,'Line From S4E2 TO P4E2 Color ',FuselageColor);
For I := 0 To 1 Do
Begin
If I = 0 Then S := 'S' Else S := 'P';
Writeln(Output,'Line From ',S,'FU0 To ',S,'3E3 Color ',FuselageColor);
Writeln(Output,'Line From ',S,'FU0 To ',S,'4E2 Color ',FuselageColor);
Writeln(Output,'Line From ',S,'FU1 To ',S,'5E5 Color ',FuselageColor);
Writeln(Output,'Line From ',S,'FU2 To ',S,'3E3 Color ',FuselageColor);
Writeln(Output,'Line From ',S,'FU2 To ',S,'FU15 Color ',CanopyColor);
Writeln(Output,'Line From ',S,'FU3 To ',S,'FU15 Color ',CanopyColor);
Writeln(Output,'Line From ',S,'FU1 To FU17 Color ',FuselageColor);
Writeln(Output,'Line From FU13 To ',S,'FU16 Color ',CanopyColor);
Writeln(Output,'Line From ',S,'FU15 To ',S,'FU16 Color ',CanopyColor);
Writeln(Output,'Line From ',S,'FU5 To FU4 Color ',FuselageColor);
Writeln(Output,'Line From ',S,'FU6 To FU4 Color ',FuselageColor);
Writeln(Output,'Line From ',S,'FU5 To ',S,'FU3 Color ',FuselageColor);
Writeln(Output,'Line From ',S,'FU1 To ',S,'FU6 Color ',FuselageColor);
Writeln(Output,'Line From ',S,'FU1 To ',S,'FU3 Color ',FuselageColor);
Writeln(Output,'Line From FU9 To ',S,'FU3 Color ',CanopyColor);
Writeln(Output,'Line From FU10 To ',S,'3E3 Color ',FuselageColor);
Writeln(Output,'Line From ',S,'FU2 To FU11 Color ',CanopyColor);
End;

(* Close the output file. *)

Close(Output);
End.


  3 Responses to “Category : Printer + Display Graphics
Archive   : SPIN.ZIP
Filename : JET.PAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/