begin flower
  # Draw flower with 12 randomly colored petals.
  #
  repeat 12
  do
    clearpath
    ellipse 5, 0, 3, 1.2

    let r = random(3)
    if r < 1
    then
      color "pastelblue"
    elif r < 2
    then
      color "pastelpink"
    else
      color "pastelgreen"
    endif
    fill

    color "black"
    linestyle 0.1
    stroke

    rotate 30
  done
end

newpage "eps", "tutorialrand1.eps", 40, 40
move 9, 8
move 24, 10
move 8, 31
move 25, 28
flower
