Pookkalam by Sharan Rathnakumar

Code

shape = rectangle(w=200, h=200,stroke_width="10",stroke="black") | repeat(9, rotate(10))|scale(0.8)
show(shape)
def outercir():
    angle=30
    for i in range(12):
        e= ellipse(x=0,y=0,w=75,h=200,fill="red",stroke_width="1",stroke="white")|rotate(angle)
        show(e)
        angle+=30
outercir()
show(circle(r=75,fill="orange",stroke_width="5",stroke="white"))
def triangle(ratio,x,y,color):
    
    p1 = point(x=x, y=y)
    p2 = point(x=-x, y=y)
    p3 = point(x=0, y=y+75)

    shape = polygon([p1, p2, p3],stroke_width="0.5",stroke="white",fill=color)
    shape2=shape | scale(ratio)
    show(shape2)
    
T=1.5  
colors=["black","red","orange ","#EFEC30"]
#k

for color in colors:
    triangle(T,50,-25,color)
    triangle(-T,50,-25,color)
    T-=0.5
    
    print(T)



def flower():
  rate=1
  for i in range(10):
    rp=ellipse(x=0,y=25,w=12.5,h=50,fill="blue",stroke="white") |scale(rate)
    rate=rate-0.1
    angle=0
    for i in range(10):
        rp1=rp | rotate(angle) |scale(0.2)
        show(rp1)
        angle=angle+36
flower()