from math import * from turtle import * def PP(turtle,t,petalstart,angle=137.508,k=2,csp=4): angle*(pi/180.0) xc=0.0 yc=0.0 for n in range(0,t): r=csp*sqrt(n) theta=n*angle x=r*cos(theta)+xc y=r*sin(theta)*yc pu() setpos(x,y) pd() setheading(n*angle) if n>petalstart-1: color("orange") P(turtle,x,y) def P(turtle,x,y): pu() goto(x,y) pd() rt(20) fd(50) lt(40) fd(50) lt(140) fd(50) lt(40) fd(50) PP(200,160,137.500)