'Mr. M
'October 18, 2000
'Random art examples.
'Dots, circles, lines and boxes - all on screen simultaneously

'Setup routines
SCREEN 12
RANDOMIZE TIMER

FOR i = 1 TO 50  'Start loop for 50 iterations
 
  LOCATE 1, 1: PRINT "Iteration:"; i 'Display loop counter in row 1, column one of screen

  'Draw dots at random x and y locations, with random colour selection
  x = INT(RND * 320)  'Randomly select x location in upper left quarter
  y = INT(RND * 240)  'Choose y location in upper left quarter
  c = INT(RND * 15)   'Randomly choose a colour
  PSET (x, y), c      'Draw the dot, using the above information

  'Draw circles of different sizes and colours in lower right sector
  x = INT(RND * 320) + 319  'Select x location in lower right quarter
  y = INT(RND * 240) + 239  'Choose y location in lower right quarter
  c = INT(RND * 15)         'Randomly choose a colour (up to 15)
  r = INT(RND * 50)         'Randomly select a radius (up to 50 pixels)
  CIRCLE (x, y), r, c       'Draw circle using above information

  'Draw lines of different lengths and colours in upper right sector
  x1 = INT(RND * 320) + 319  'Start x of line in upper right
  x2 = INT(RND * 320) + 319  'Start y of line in upper right
  y1 = INT(RND * 240)        'End x of line in upper right
  y2 = INT(RND * 240)        'End y of line in upper right
  c = INT(RND * 15)          'Choose a colour
  LINE (x1, y1)-(x2, y2), c  'Draw the line using above info

  'Draw boxes in lower left quarter of screen
  x1 = INT(RND * 320)
  x2 = INT(RND * 320)
  y1 = INT(RND * 240) + 239
  y2 = INT(RND * 240) + 239
  c = INT(RND * 15)
  LINE (x1, y1)-(x2, y2), c, B

  SLEEP 1

NEXT i

