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

 
Output of file : FIREWORK.PAS contained in archive : SPIN.ZIP
Program Fireworks;

(* This program generates an AcroSpin file called FIREWORK.FIL that displays *)
(* fireworks. You can change the colors and number of fireworks by changing *)
(* the following constants. *)
(* David B. Parker *)

(* Constants. *)

Const Color1 = 10; (* First color. *)
Color2 = 12; (* Second color. *)
Color3 = 13; (* Third color. *)
Color4 = 14; (* Fourth color. *)
NumberOfLines = 60; (* Number of fireworks. *)
Scale = 10000.0; (* Scale factor. *)

(* Type. *)

Type ColorArrayType = Array[0..3] Of Integer;

(* Array of colors. *)

Const ColorArray: ColorArrayType = ( Color1,Color2,Color3,Color4 );

(* Variables. *)

Var I : Integer; (* Looping variable. *)
X, Y, Z: Real; (* Coordinates. *)
Length : Real; (* Length of firework. *)
Output : Text; (* Output file. *)

(* Open output file for writing. *)

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

(* Coordinate of center of display. *)

Writeln(Output,'EndPoint X 0 Y 0 Z 0 Name Center');

(* Write out axes so that display is correctly centered. *)

Writeln(Output,'EndPoint X ',Round(Scale),' Y 0 Z 0 Name C1');
Writeln(Output,'EndPoint X ',Round(-Scale),' Y 0 Z 0 Name C2');
Writeln(Output,'EndPoint X 0 Y ',Round(Scale),' Z 0 Name C3');
Writeln(Output,'EndPoint X 0 Y ',Round(-Scale),' Z 0 Name C4');
Writeln(Output,'EndPoint X 0 Y 0 Z ',Round(Scale),' Name C5');
Writeln(Output,'EndPoint X 0 Y 0 Z ',Round(-Scale),' Name C6');
For I := 1 To 6 Do
Writeln(Output,'Line From C',I,' To Center Color ',ColorArray[I Mod 4]);

(* Write out fireworks. *)

For I := 1 To NumberOfLines Do
Begin
X := Random-0.5;
Y := Random-0.5;
Z := Random-0.5;
Length := Sqrt(Sqr(X)+Sqr(Y)+Sqr(Z));
Writeln(Output,'EndPoint X ',Round(Scale*X/Length),
' Y ',Round(Scale*Y/Length),
' Z ',Round(Scale*Z/Length),
' Name P',I);
Writeln(Output,'Line From P',I,' To Center Color ',ColorArray[I Mod 4]);
End;

(* Close the output file. *)

Close(Output);
End.


  3 Responses to “Category : Printer + Display Graphics
Archive   : SPIN.ZIP
Filename : FIREWORK.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/