Pookkalam by Rebekah Omana Benny

Code

c = circle(r=150, fill="black", stroke="black", stroke_width=0)
show(c)
circle1 = circle(r=140, fill="pink", stroke="none")
circle2 = circle(r=130, fill="purple", stroke="none")
show(circle1, circle2)
c1 = circle(r=150,fill='black')
show (c1)
#outer layer
sublayer1 = rectangle (w=209,h=209,fill="pink", stroke="black  ") | repeat (20,rotate(50))
show(sublayer1)
sublayer2=rectangle(w=192,h=192, fill="violet",stroke="black")|rotate(15)| repeat(20,rotate(50))
show(sublayer2)
sublayer3=rectangle(w=178,h=178,fill="yellow",stroke="yellow")|repeat(20,rotate(50))
show(sublayer3)
sublayer4=rectangle(w=166,h=166,fill="white",stroke="white")|rotate(15)|repeat(20,rotate(50))
show(sublayer4)
#middle layer
c2=circle(r=106,fill='pink',stroke='pink')
show(c2)
e1=ellipse(h=165,w=30,fill='yellow',stroke_width=0.2)|repeat(15,rotate(40)) 

c = circle(r=120,fill='#168D6D')
c0=circle(r=130,fill="pink")
m0=rectangle(h=184,w=184,fill="black")|repeat(100,rotate(20))
m2=rectangle(h=175,w=175,fill="purple")|repeat(100,rotate(20))
m5=rectangle(h=158,w=158,fill="indigo")|repeat(100,rotate(20))
m4=rectangle(h=150,w=150,fill="purple")|repeat(100,rotate(20))
c2=circle(r=90,fill="white")
c3=ellipse(h=200,w=5,fill="black")|repeat(200,rotate(200))
c4=ellipse(h=200,w=11,fill="pink")|repeat(200,rotate(200))
c5=ellipse(h=200,w=20,fill="violet")|repeat(200,rotate(200))
c6=ellipse(h=200,w=29,fill="indigo")|repeat(200,rotate(200))
c7=ellipse(h=200,w=38,fill="blue")|repeat(200,rotate(200))
c8=ellipse(h=200,w=50,fill="green")|repeat(200,rotate(200))
c9=ellipse(h=200,w=70,fill="blue")|repeat(200,rotate(200))
e1=circle(r=50,fill="peach")
e2=circle(r=48,fill="Peach") 
r0=rectangle ( h=69,w=69,fill="black")
r3=rectangle(h=69,w=69,fill="black")|rotate(45)
r1=rectangle(h=65,w=65,fill="pink",stroke="pink")|repeat(2,rotate(45))
r5=rectangle(h=53,w=53,fill="black")
r4=rectangle(h=53,w=53,fill="black")|rotate(45)
r2=rectangle(h=50,w=50,fill="purple",stroke="purple")|repeat(2,rotate(45))
c10=circle(r=30,fill="black")
c11=circle(r=27,fill='grey') 
c12=ellipse(h=50,w=10,fill='blue')|repeat(200,rotate(200))
c13=ellipse(h=40,w=8,fill='purple')|repeat(200,rotate(200))
c14=circle(r=10,fill="black")
show (c,m0,m2,m5,m4,c2,r2,c9,c8,c7,c6,c5,c4,c3,e1,e2,r0,r3,r1,r5,r4,r2,c10,c11,c12,c13,c14)
def bottomEllipse(x,y,w,h,fill):
    e = ellipse(x,y+h/2,w,h,fill=fill,stroke="none")
    return(e)

def petal(x,y,h,c1,c2,c3):
    p1=bottomEllipse(x,y,h/2,h,fill=c1)
    p2=bottomEllipse(x,y,h/3,h/1.5,fill=c2)
    p3=bottomEllipse(x,y,h/4,h/2,fill=c3)
    return(p1+p2+p3)

def flower(n,c1,c2):
    d = petal(0,n/4,n,c1,c2,c1)|repeat(8,rotate(45))
    c=circle(r=n/4,fill=c2,stroke="none")
    return(d+c)

d1=color(r=255, g=153, b=211)
d2=color(r=255, g=0, b=144)
f1 = flower(25,d1,d2)
def bottomEllipse(x,y,w,h,fill):
    e = ellipse(x,y+h/2,w,h,fill=fill,stroke="none")
    return(e)

def petal(x,y,h,c1,c2,c3):
    p1=bottomEllipse(x,y,h/2,h,fill=c1)
    p2=bottomEllipse(x,y,h/3,h/1.5,fill=c2)
    p3=bottomEllipse(x,y,h/4,h/2,fill=c3)
    return(p1+p2+p3)

def flower(n,c1,c2):
    d = petal(0,n/4,n,c1,c2,c1)|repeat(8,rotate(45))
    c=circle(r=n/4,fill=c2,stroke="none")
    return(d+c)

d1=color(r=255, g=153, b=211)
d2=color(r=255, g=0, b=144)
f1 = flower(25,d1,d2)
shape = f1| scale(0.8) | translate(y=100) | repeat(100, rotate(30) | scale(0.96)) 
show(shape)
shape = f1| scale(0.8) | translate(y=100) | repeat(100, rotate(30) | scale(0.96)) 
show(shape)