Code

GraphicsWindow.Show()  
   
pic = Flickr.GetRandomPicture("lightning")  
gw = GraphicsWindow.Width  
gh = GraphicsWindow.Height  
GraphicsWindow.DrawResizedImage(pic, 0, 0, gw, gh)  
   
distance = 50  
Turtle.Speed = 9  
   
For sides = 3 To 20  
  DrawPolygon()  
EndFor  
   
Sub DrawPolygon  
  angle = 360 / sides  
  For i = 1 To sides  
    GraphicsWindow.PenColor = GraphicsWindow.GetRandomColor()  
    Turtle.Move(distance)  
    Turtle.Turn(angle)  
  EndFor  
EndSub

Screenshot

Original photo by JR Manuel (CC BY-NC 2.0)


See Also

Other Languages