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

 
Output of file : CALIFORN.PAS contained in archive : SPIN.ZIP
Program California;

(* This program generates an AcroSpin file called CALIFORN.FIL that displays *)
(* a map of California. I wrote this program using Turbo Pascal version 3.0. *)
(* You can modify a number of parameters by changing the following constants. *)
(* *)
(* David B. Parker *)

(* Constants. *)

Const
StateColor = 14; (* Color to use for the word California. *)
CityColor = 13; (* Color to use for the names of cities. *)
CityDotColor = 10; (* Color to use for city dots. *)
AcroBitsColor = 11; (* Color to use for Acrobits. *)
ArrowColor = 15; (* Color to use for the arrow. *)
OutlineColor = 9; (* Color to use for the outline of the state. *)
OutlineCoors = 40; (* Number of lines in outline of state. *)

(* Types. *)

Type XYCoors = (X,Y);
OutlineArrayType = Array[1..OutlineCoors,XYCoors] Of Integer;

(* Variables. *)

Var I, J : Integer; (* Looping variables. *)
Output: Text; (* Output file. *)

(* Coordinates of the outline of the state. *)

Const
CityNumber: Integer = 0;
OutlineArray: OutlineArrayType = (
(*1*) ( 0, 0),
(*2*) ( 0,-214),
(*3*) ( 315,-491),
(*4*) ( 351,-541),
(*5*) ( 326,-568),
(*6*) ( 322,-631),
(*7*) ( 334,-636),
(*8*) ( 334,-646),
(*9*) ( 322,-654),
(*10*) ( 174,-674),
(*11*) ( 156,-627),
(*12*) ( 110,-588),
(*13*) ( 95,-589),
(*14*) ( 89,-560),
(*15*) ( -38,-531),
(*16*) ( -38,-490),
(*17*) (-110,-400),
(*18*) (-102,-371),
(*19*) (-109,-359),
(*20*) (-117,-361),
(*21*) (-137,-339),
(*22*) (-143,-313),
(*23*) (-142,-298),
(*24*) (-135,-296),
(*25*) (-133,-312),
(*26*) (-115,-322),
(*27*) (-131,-297),
(*28*) (-134,-286),
(*29*) (-127,-278),
(*30*) (-139,-273),
(*31*) (-139,-294),
(*32*) (-143,-295),
(*33*) (-162,-281),
(*34*) (-170,-283),
(*35*) (-167,-268),
(*36*) (-208,-214),
(*37*) (-212,-156),
(*38*) (-240,-108),
(*39*) (-223, -66),
(*40*) (-223, 6) );

(* Include the subroutine for writing text. *)

{$I WRITETEX.PAS}

(* Subroutine to put a dot on the map to indicate a city. *)

Procedure CityDot( X, Y: Real );
Var I, J: Integer;
Begin
CityNumber := CityNumber+1;
For I := 0 To 7 Do
Writeln(Output,'EndPoint X ',Round(X+30.0*Cos(2.0*Pi*I/8.0)),
' Y ',Round(Y+30.0*Sin(2.0*Pi*I/8.0)),
' Name C',CityNumber,'P',I);
For I := 0 To 7 Do
Begin
J := I+1;
If I = 7 Then J := 0;
Writeln(Output,'Line From C',CityNumber,'P',I,' To C',CityNumber,'P',J,
' Color ',CityDotColor);
End;
End;

(* Open the output file. *)

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

(* Write out the end points for the outline. The name of each end point is *)
(* the letter P followed by the number of the end point. *)

For I := 1 To OutlineCoors Do
Writeln(Output,'EndPoint X ',10*OutlineArray[I,X],
' Y ',10*OutlineArray[I,Y],
' Name P',I);

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

For I := 1 To OutlineCoors Do
Begin
J := I+1;
If I = OutlineCoors Then J := 1;
Writeln(Output,'Line From P',I,' To P',J,' Color ',OutlineColor);
End;

(* Write the name of the state and cities. *)

WriteText(StateColor,400.0,400.0,0.0,0.0,0.0,400.0,-1500.0,0.0,'California');
CityDot(-830.0,-2230.0);
WriteText(CityColor,75.0,75.0,0.0,0.0,0.0,-1000.0,-2150.0,0.0,'Sacramento');
CityDot(-1380.0,-3000.0);
WriteText(CityColor,75.0,75.0,0.0,0.0,0.0,-2450.0,-3050.0,0.0,'San Francisco');
CityDot(-1270.0,-3240.0);
WriteText(CityColor,75.0,75.0,0.0,0.0,0.0,-1245.0,-3365.0,0.0,'Menlo Park');
CityDot(1100.0,-5710.0);
WriteText(CityColor,75.0,75.0,0.0,0.0,0.0,1150.0,-5660.0,0.0,'Los Angeles');
CityDot(1730.0,-6590.0);
WriteText(CityColor,75.0,75.0,0.0,0.0,0.0,1780.0,-6540.0,0.0,'San Diego');

(* Write out the arrow and the word Acrobits. *)

Writeln(Output,'EndPoint X ',Round(-600.0+2.0*0.90*(450.0-1270.0)),
' Y ',Round(450.0-3240.0-1270.0),
' Name Arrow1');
Writeln(Output,'EndPoint X ',Round(-600.0+0.90*(450.0-1270.0)),
' Y ',Round(450.0-3240.0-1270.0-0.90*(450.0-1270.0)),
' Name Arrow2');
Writeln(Output,'EndPoint X ',Round(-600.0+0.90*(450.0-1270.0)-200.0),
' Y ',Round(450.0-3240.0-1270.0-0.90*(450.0-1270.0)),
' Name Arrow3');
Writeln(Output,'EndPoint X ',Round(-600.0+0.90*(450.0-1270.0)),
' Y ',Round(450.0-3240.0-1270.0-0.90*(450.0-1270.0)-200.0),
' Name Arrow4');
Writeln(Output,'Line From Arrow1 To Arrow2 Color ',ArrowColor);
Writeln(Output,'Line From Arrow2 To Arrow3 Color ',ArrowColor);
Writeln(Output,'Line From Arrow2 To Arrow4 Color ',ArrowColor);
WriteText(AcroBitsColor,300.0,300.0,0.0,0.0,0.0,-3500.0,-4500.0,0.0,'AcroBits');

(* Close the output file. *)

Close(Output);
End.


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