Pookkalam by Anandhu Mohanan

Code

import math

def one_part_of_ellips(r,theta):
    return point(math.sin(theta)*(r),math.cos(theta)*r)


points = [point(50,0) ]

r = 130 
part = 0.045 

p = 0.01

i = 0
while i < (3.14*(part*2)):
    points.append(one_part_of_ellips(r,i))
    i = i+p 
    

s2=rectangle(h=200,w=200,fill="#9F000F",stroke="none")|repeat(20,rotate(15))
s3=rectangle(h=212,w=212,fill="#3F000F")|repeat(20,rotate(15))
s4=rectangle(h=200,w=200,fill="#9F000F",stroke="none")|rotate(7.5)|repeat(20,rotate(15))
s5=rectangle(h=212,w=212,fill="#3F000F")|rotate(7.5)|repeat(20,rotate(15))
show(s5,s4,s3,s2)
    


color= ["#9F000F", "#F62817","#FF8C00", "#FFEF00", "#B1FB17"]
n=15
while n < 361 :
    for i in color:
        show(polygon(points,fill=i,stroke="none") | rotate(n)) 
        n=n+15
        
rect3=rectangle(w=165,h=165,fill="#FFFF00",stroke="none")|repeat(20,rotate(50))
show(rect3)

rect2=rectangle(w=153,h=153,fill="#fc9802",stroke="none")|repeat(20,rotate(50))
show(rect2)

rect1=rectangle(w=140,h=140,fill="#9F000F",stroke="none")|repeat(20,rotate(50))
show(rect1)




c12=circle(r=85,fill="#FFA500",stroke="none")
c11=circle(r=80,fill="#FFA500",stroke="none")
c10=circle(r=75,fill="#FDD017",stroke="none")
c9=circle(r=70,fill="#FFFF00",stroke="none")
c8=circle(r=65,fill="#FFA500",stroke="none")
c7=circle(r=60,fill="#FDD017",stroke="none")
c6=circle(r=55,fill="#FFFF00",stroke="none")
c5=circle(r=50,fill="#FFFF00",stroke="none")
c4=circle(r=45,fill="#FFA500",stroke="none")
c3=circle(r=40,fill="#FDD017",stroke="none")
c2=circle(r=35,fill="#FFFF00",stroke="none")
c1=circle(r=30,fill="#FFFF00",stroke="none")
c0=circle(r=25,fill="#FFFF00",stroke="none")
show(c12,c11,c10,c9,c8,c7,c6,c5,c4,c3,c2,c1,c0)



k1=ellipse(x=-12,y=40,h=35,w=90,fill="orange",stroke="none")| rotate(25)
k2=ellipse(x=-12,y=40,h=32,w=90,fill="#BE6A26",stroke="none")| rotate(25)
k3=ellipse(x=-12,y=40,h=25,w=90,fill="#732304",stroke="none")| rotate(25)
k4=ellipse(x=-12,y=40,h=22,w=90,fill="#663402",stroke="none")| rotate(25)
k5=ellipse(x=-12,y=40,h=15,w=90,fill="#732304",stroke="none")| rotate(25)
k6=ellipse(x=-12,y=40,h=12,w=90,fill="#311400",stroke="none")| rotate(25)
k=k1+k2+k3+k4+k5+k6
show(k)
l1=line(x1=-30,y1=30,x2=0,y2=-20,stroke_width=3,stroke="#BE6A26")
l2=line(x1=-26,y1=27,x2=0,y2=-20,stroke_width=3,stroke="#311400")
show(l1,l2)


c0=circle(x=10,y=16,r=27,fill="#FFFF50",stroke="#DF9739")
c1=circle(x=10,y=15,r=25,fill="#EAB431",stroke="none")
c2=circle(x=10,y=14,r=20,fill="#E49F0A",stroke="none")
c3=circle(x=10,y=10,r=15,fill="#DD890F",stroke="none")
show(c0,c1,c2,c3)
r1=rectangle(w=30,h=15,x=10,y=10,fill="#FBDE47",stroke="none")
r2=rectangle(w=20,h=15,x=10,y=20,fill="#FFE851",stroke="none")
r3=rectangle(w=10,h=10,x=10,y=30,fill="FFE851",stroke="none")
r4=rectangle(w=25,h=15,x=12,y=10,fill="#FFD214",stroke="none")
r5=rectangle(w=15,h=15,x=12,y=20,fill="#FFD214",stroke="none")
r6=rectangle(w=7,h=10,x=12,y=30,fill="#FFD214",stroke="none")
r=r1+r2+r3+r6+r5+r4
show(r)


e2=ellipse(w=33,h=25,x=10,y=-20,fill="#FFCAA0",stroke="#b06b04")
e3=ellipse(w=20,h=20,x=10,y=0,fill="#FFCAA0",stroke="#b06b04")
e4=ellipse(w=23,h=25,x=14,y=-22,fill="#F8B68C",stroke="none")


show(e2,e4,e3)


s1=rectangle(w=36,h=30,x=10,y=-43,fill="white",stroke="#d68202")
s2=rectangle(w=26,h=30,x=15,y=-43,fill="white",stroke="#d68202")
show(s1,s2)