home *** CD-ROM | disk | FTP | other *** search
-
- radar:
- enter graphics mode;
- print heading;
- determine parameters;
- draw radar;
- wait for confirmation (2 * graphics x limit DIV 3, 1);
- leave graphics mode.
-
- print heading:
- put ("Radar");
- line;
- put ("=====").
-
- determine parameters:
- REAL CONST radius ::
- real (min (graphics x limit, graphics y limit)) / 2.1;
- INT CONST centre x :: graphics x limit DIV 2,
- centre y :: graphics y limit DIV 2.
-
- draw radar:
- INT VAR i;
- FOR i FROM 0 UPTO 359
- REP
- move (centre x, centre y);
- draw (centre x + round (aspect * sin (i) * radius),
- centre y + round (cos (i) * radius))
- ENDREP.
-
-