Code
#HAPPY ONAM
def backgroud_color():
bg=rectangle(w=310,h=310,fill='#DEDDDD',stroke='none')
bg1=circle(r=20.5,x=130,y=130,fill='#fdf6ff',stroke='none')|repeat(12,rotate(30))
bg2=polygon([point(x=130,y=150),point(x=130,y=140),point(x=150,y=130),point(x=150,y=-130),point(x=130,y=-150),point(x=-130,y=-150),point(x=-150,y=-130),point(x=-150,y=130),point(x=-130,y=150)],fill='#fdf6ff',stroke='none')
return bg+bg1+bg2
def first_layer():
scl=[2.10,1.97,1.84,1.71,1.58,1.45]
col=['#7d1004','#f76d15','#ffe40c','#edbb0a','white','#3E188B']
c1= ellipse(y=81,x=25,w=140,h=130,fill='#0C0D0F',stroke='none')| repeat(38, rotate(35))
r=rectangle(stroke='none')
for i in range(6):
r+= rectangle(w=100,h=100,fill=col[i],stroke='none')|scale(scl[i])|repeat(4,rotate(150))
c2 = circle(r=87,fill='#0C0D0F',stroke='none')
return c1+r+c2
def arrow():
t1=[point(x=0,y=100),point(x=25,y=35),point(x=23.5,y=22),point(x=0,y=83)]
t2=[point(x=0,y=100),point(x=-25,y=35),point(x=-23.5,y=22),point(x=0,y=83)]
col=['white','#edbb0a','#ffe40c','#f76d15','#7d1004','#0C0D0F']
y1=[0,-11,-23,-36,-49,-63]
s1=s2=polygon([point(0,0)],stroke='none')
sc=scale()
for i in range(6):
s1+=polygon(t1,fill=col[i],stroke='none')|translate(x=0,y=y1[i])|sc
s2+=polygon(t2,fill=col[i],stroke='none')|translate(x=0,y=y1[i])|sc
sc=scale(.94**(i+1))
s3=polygon([point(x=0,y=20),point(x=17,y=-29.5),point(x=-17,y=-29.5)],fill='black',stroke='none')
ar=(s1+s2+s3)|scale(1.5)|translate(x=0,y=224)|scale(0.4)|repeat(12,rotate(150))
return ar
def second_layer():
e1= ellipse(y=10,w=110,h=53,fill='#972402',stroke='none')| repeat(12, rotate(45))
rz=[110,237,219,110,237,219]
gz=[94,190,44,94,190,44]
bz=[182,20,32,182,20,32]
rt=30
ef=ec=ellipse(stroke='none')
for i in range(0,6,1):
for j in range(1,70,1):
ec+=ellipse(w=169-j,h=70-j,fill=color(r=rz[i]-4.5*j,g=gz[i]-4.5*j,b=bz[i]-4.5*j),stroke_width='0')
ef+=ec|rotate(rt)
rt+=30
rx=[204,152,0,204,152,0]
gx=[82,0,105,82,0,105]
bx=[0,55,0,0,55,0]
rt=30
et=ee=ellipse(stroke='none')
for i in range(0,6,1):
for j in range(1,70,1):
ee+=ellipse(w=169-j,h=70-j,fill=color(r=rx[i]+2*j,g=gx[i]+2*j,b=bx[i]+2*j),stroke_width='0')
et+=ee|rotate(rt)|scale(.87)
rt+=30
return ef+et
def third_layer():
es=ellipse(w=180,h=73,fill='#fdfdf1',stroke='none')|repeat(6,rotate(30))|scale(.65)
l=line(x1=21.8,y1=21.8,x2=35.8,y2=38,stroke_width=1.5)|repeat(12,rotate(30))
l2=line(x1=21.8,y1=21.8,x2=37.8,y2=36,stroke_width=1.5)|repeat(12,rotate(30))
l3=line(x1=21.8,y1=21.8,x2=37,y2=37,stroke_width=2)|repeat(12,rotate(30))
c3=circle(r=49,fill='#ffe40c',stroke='none')
c4=circle(r=43,fill='#edbb0a',stroke='none')
c5=circle(r=37,fill='#f76d15',stroke='none')
c6=circle(r=31,fill='#da0102',stroke='none')
c8=circle(r=24.5,fill='#3E188B',stroke='none')
c9=circle(r=19,fill='#981e6c',stroke='none')
c10=circle(r=13.9,fill='#fdfdf1',stroke='none')
c11=circle(stroke='none')
c7=((circle(r=10,x=50,fill='#0C0D0F')|repeat(12,rotate(30)))+circle(r=52,fill='#0C0D0F'))|scale(.48)
for i in range(12,1,-1):
j1=color(r=62+8*i,g=10+3*i,b=42+13*i)
c11+=circle(r=i,fill=j1,stroke='none')
return es+c3+c4+c5+c6+c7+c8+c9+c10+c11+l+l2+l3
show(backgroud_color(),first_layer(),arrow(),second_layer(),third_layer())