Pookkalam by Adil Ayyoob

Code

# backgroung grass
color_shadow = color(r=0,g=0,b=0,a=0.7)
grass = ellipse(x=-150,y=-150,w=3,h=30,fill=color_shadow) + ellipse(x=-148,y=-148,w=3,h=30,fill="#0c7d16",stroke="none") 
grass_fill = grass | repeat(100,translate(x=3)) | repeat(21,translate(y=15))

# pookalam
r1 = rectangle(w=10,h=10,x=-5,y=140,fill="black",stroke="none")
r2 = rectangle(w=10,h=10,x=5,y=140,fill="red",stroke="none")
row_1 = r1 + r2 | repeat(40,rotate(9))
r3 = rectangle(w=10,h=10,x=-5,y=130,fill="red",stroke="none")
r4 = rectangle(w=10,h=10,x=5,y=130,fill="orange",stroke="none")
row_2 = r3 + r4 | repeat(40,rotate(9))
r5 = rectangle(w=10,h=10,x=-5,y=120,fill="orange",stroke="none")
r6 = rectangle(w=10,h=10,x=5,y=120,fill="yellow",stroke="none")
row_3 = r5 + r6 | repeat(40,rotate(9))
r7 = rectangle(w=10,h=10,x=-5,y=110,fill="yellow",stroke="none")
r8 = rectangle(w=10,h=10,x=5,y=110,fill="#e2ff29",stroke="none")
row_4 = r7 + r8 | repeat(40,rotate(9))
c1 = circle(r=105,fill="#e2ff29",stroke="none")
e1 = ellipse(w=90,h=100,x=0,y=55,fill="black",stroke="none")
e2 = ellipse(w=90,h=100,x=-5,y=45,fill="red",stroke="none")
e3 = ellipse(w=90,h=100,x=-10,y=35,fill="orange",stroke="none")
e4 = ellipse(w=90,h=100,x=-15,y=25,fill="yellow",stroke="none")
e5 = ellipse(w=90,h=100,x=-20,y=15,fill="#e2ff29",stroke="none")
flower =  e1 + e2 + e3 + e4 + e5 | repeat(6,rotate(60))
petal_1 = ellipse(x=0,y=10,w=10,h=20,fill="black",stroke="none")
petal_2 = ellipse(x=0,y=10,w=7.5,h=15,fill="red",stroke="none")
petal_3 = ellipse(x=0,y=10,w=5,h=10,fill="orange",stroke="none")
petal_4 = ellipse(x=0,y=10,w=3.5,h=6,fill="yellow",stroke="none")
petal_collection = petal_1 + petal_2 + petal_3 + petal_4
flower_2 = petal_collection | repeat(12,rotate(30))
flower_2_link = flower_2 | translate(x=40,y=40) | repeat(12,rotate(30))
petal_5 = ellipse(x=0,y=10,w=10,h=20,fill="yellow",stroke="none")
petal_6 = ellipse(x=0,y=10,w=7.5,h=15,fill="orange",stroke="none")
petal_7 = ellipse(x=0,y=10,w=5,h=10,fill="red",stroke="none")
petal_8 = ellipse(x=0,y=10,w=3.5,h=6,fill="black",stroke="none")
petal_collection_2 = petal_5 + petal_6 + petal_7 + petal_8
flower_3 = petal_collection_2 | repeat(12,rotate(30))
flower_3_link = flower_3 | translate(x=25,y=25) | repeat(8,rotate(45)) 
c2 = circle(r=20,fill="black",stroke="none")
c3 = circle(r=16,fill="red",stroke="none")
c4 = circle(r=12,fill="orange",stroke="none")
c5 = circle(r=8,fill="orange",stroke="none")
c6 = circle(r=5,fill="white",stroke="none")
pookalam = row_1 + row_2 + row_3 + row_4 + c1 + flower + c2 + c3 + c4 + c5 + c6 + flower_3_link + flower_2_link 
full_pookalam = grass_fill + pookalam
show(full_pookalam)