(* desenhar um polĂ­gono e recolocar a tartaruga *) def polygone_aux(n, d, a) { turnleft 90 + a/2 repeat n { forward d turnleft a } turnleft 90 - a/2 } def polygone(n, r) { penup forward r pendown polygone_aux(n, r, 360/n) penup forward r turnleft 180 pendown } def carre(r) polygone(4, r) def pentagone(r) polygone(5, r) // carre(100) // color red // pentagone(100) color blue polygone(6, 100) // color green // polygone(12, 100) color red repeat 36 { pentagone(200) turnleft 10 }