#Plot n random dots in the plane.  We will
#use a canvas of 500x500=250000 pixels.,
#and plot 10000 dots.

#Just to make things look more interesting,
#we'll update the display at each dot, so
#that we get an animated view. 

from random import *
def random_dots(n):
  pic=makeEmptyPicture(500,500)
  show(pic)
  for shot in range(0,n):
    x=1+int(500*random())
    y=1+int(500*random())
    addLine(pic,x,y-1,x,y+1)
    addLine(pic,x-1,y,x+1,y)
    repaint(pic)