logo backcolor = "black"
logo linethick = 0.5
message "Pipes" "Stop"

// if drawing wanders off screen, this allows line to wrap & be visible again...
logo wrapedges 

logo linecolor = "powderblue"
logo circarc = 90 270

// do a random walk and capture points..
pointlist startcapture
moveto middle
repeat 50 [
  fd (calc 50 + (random 200))
  if (random 100) > 50 [ rt 90 ]
  else [ lt 90 ]
  ]
pointlist endcapture

// now convert to dots..
pointlist startcapture
  pointlist dotfill 10
pointlist endcapture

// now render ellipses to make it look like pipes..
clear
set npts = pointlist size
set i = 1
repeat :npts [
  if keypress = 1 [ break ]
  pu; moveto point :i;  pd
  logo circrotate turtledir
  ellipse 20 10
  incr i by 1
  wait 1
  ]

