views:

314

answers:

1

How can I draw a multi-color randomized unicorn using Logo?

the algorithm is described in balpha's blog, but I don't know which steps to start with to implement it in Logo

+6  A: 

Using Logo.NET:

GETME System.Drawing
GETME System.Drawing.Rainbow
GETME System.MythicalCreatures

TO drawUnicorn :args
  PENUP
  HOME
  FORWARD 100
  LEFT 30 ; make it jump
  MAKE "unicorn ANEW Unicorn
  MAKE "colors FROM PrettyColor IN Rainbow COUNT 5 SELECT PrettyColor
  MAKE "graphics GET Graphics FROM :args
  DO Draw FROM "graphics WITH "unicorn, "color
END

Edit: sorry, you asked for multi-color randomized. Fixed with a Logo INtegrated Query.

Thomas