After you draw a shape, how do you fill it?

pen violet, 5, 'miter'
for [1..5]
  fd 100
  rt 144
fill gold

fill actually works by filling and retracing the path that you have drawn with the current pen.

  • If you happen to use jump, pen up, or pen down, it is still the same path, and the discontinuous parts will be filled as separate islands.
  • But if you switch pen colors or use pen null, it will end the path and start a new one.
  • If you don't draw the ends of your shapes together, fill will not draw the missing sides: it will just color in what you have drawn.
pen gold, 10
rt 180, 50
pen orangered, 10
for [1..3]
  jump 25, 25
  lt 90
  rt 180, 50
fill orange