home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / mbug / mbug043.arc / ELLIPSES.PAS < prev    next >
Pascal/Delphi Source File  |  1979-12-31  |  640b  |  24 lines

  1. PROGRAM ellipses (input, output);
  2. {$ILORES.LIB)
  3.  
  4.   VAR
  5.     x_rad, y_rad : byte;
  6.     centre : pt;
  7.  
  8.   BEGIN
  9.     fillchar (vdu_ram, sizeof (vdu_ram), ' ');
  10.     set_screen (s80_24);
  11.     init_pcg;
  12.     REPEAT
  13.       centre . x := random (screen . cols);
  14.       centre . y := random (screen . rows);
  15.       x_rad := random (screen . cols DIV 2);
  16.       y_rad := random (screen . rows DIV 2);
  17.       ellipse (centre, x_rad, y_rad, invert);
  18.       IF NOT error THEN
  19.         fill (centre, fill_mode (random (2)))
  20.     UNTIL keypressed;
  21.     set_screen (s80_24);
  22.     inverse_init
  23.   END.
  24.