to square100 forward 100 right 90 forward 100 right 90 forward 100 right 90 forward 100 right 90 end to triangle :length repeat 3 [forward :length right 120] end to square :length repeat 4 [forward :length right 90] end to csquare :length penup fd :length/2 rt 90 fd :length/2 ; move to a corner pendown repeat 4 [fd :length rt 90] penup fd :length/2 rt 90 fd :length/2 ; move to the center pendown end to poly :sides :length :color setpencolor :color repeat :sides [ forward :length right 360/:sides ] end to colorpoly :sides :length :color setpencolor :color poly :sides :length :color setfloodcolor :color fd :length/2 rt 90 fd :length/2 fill bk :length/2 lt 90 bk :length/2 end to spin :sides :length :step ht repeat :step [ poly :sides :length 0 rt 360/:step ] st end to spiral :sides :num :step ht repeat :num [ pendown poly :sides 10+(repcount * :step) 0 penup home seth repcount * :step ] pendown st end to splash :num :radius ht repeat :num [ pendown colorpoly 2+(round (random 10)) 10+(round (random 30)) (round (random 7)) penup setxy (round (random :radius))-(:radius/2) (round (random :radius))-(:radius/2) ] pendown st end