Pookkalam by Afras Aboobacker P

Code

c1 = circle(r=150,fill='brown')
show (c1)
#outer layer
o1 = rectangle (w=209,h=209,fill="red", stroke="red") | repeat (20,rotate(50))
o2=rectangle(w=192,h=192, fill="orange",stroke="orange")|rotate(15)| repeat(20,rotate(50))
o3=rectangle(w=178,h=178,fill="yellow",stroke="yellow")|repeat(20,rotate(50))
o4=rectangle(w=166,h=166,fill="white",stroke="white")|rotate(15)|repeat(20,rotate(50))
show(o1,o2,o3,o4)
#middle layer
c2=circle(r=106,fill='orange',stroke='maroon',stroke_width = 4)
show(c2)
s1 = ellipse(h=209,w=109,fill='yellow',stroke='yellow')
s2 = s1 | repeat(5,rotate(45))
s3 = ellipse(h=178,w=78,fill='white',stroke='white')
s4 = s3 | repeat(5,rotate(45))
s5 = ellipse(h=148,w=48,fill='orange',stroke='orange')
s6 = s5 | repeat(5,rotate(45))
show(s2,s4,s6)
def triangle(px,py,pz,color) :
    return polygon([px,py,pz],fill=color,stroke='none')
# last layer
inner_bud = circle(r=20,fill='white',stroke='none')
orange_petal = ellipse(h=45,w=20,x=0,y=15,fill='#ffb733',stroke='none') | rotate(30) | repeat(6,rotate(60))
p1 = point(x=0,y=50)
p2 = point(x=20,y=0)
p3 = point(x=-20,y=0)
inner_circle = circle(r=50,fill='#004600',stroke='none')
show(inner_circle)
show(triangle(p1,p2,p3,'yellow') | repeat(6,rotate(60)))
show(orange_petal)
show(inner_bud)
p1=circle(r=5,fill="yellow")
p2=ellipse(w=56,h=10,fill="#DC143C")| repeat(6,rotate(30))|scale(0.6)
show(p2,p1)