Pookkalam by Abinsha A

Code

ellip= Ellipse(height=290, width=145, fill=color(252, 39, 28), stroke="transparent") + Ellipse(height=270, width=135, fill=color(245, 121, 32), stroke="transparent") + Ellipse(height=250, width=125, fill=color(245, 223, 54), stroke="transparent") | rotate(45/2) | repeat(4, rotate(45))

hex = Rectangle(height=90,width=220, fill=color(87, 22, 171), stroke="transparent") | rotate(45/2) |repeat(4, rotate(45))



star1 = Rectangle(width=183, height=183, fill=color(5, 54, 250), stroke="transparent") | rotate(45/2)
c1= Circle(radius=98, fill=color(5, 54, 250), stroke="transparent")
outer = star1+c1 | repeat(2, rotate(45))

star2 = Rectangle(width=135, height=135, fill="cyan") | rotate(45/2)
c2= Circle(radius=73, fill="cyan", stroke="transparent")
inner = star2+c2 | repeat(2, rotate(45))

a=Point(27,67)
b=Point(37,92)
c=Point(0,95)
d=Point(0,130)

p=Point(-27,67)
q=Point(-37,92)



p1=polygon([a,b,d,c], fill=color(5, 54, 250), stroke="transparent") | rotate(45/2)
p2=polygon([p,q,d,c], fill=color(212, 216, 215), stroke="transparent") | rotate(45/2)
p=p1+p2
polygn = p | repeat(8, rotate(45))


cl=Ellipse(height=35, width=37, stroke="transparent",fill=color(180,0,0)) + Ellipse(height=25, width=27,stroke="transparent",fill=color(0, 180, 0), center=Point(0,-5))
cborder = cl | translate(0,80) | repeat(15, rotate(360/15))
cbase= Circle(radius=76, fill="red",stroke="transparent") + Circle(radius=69, fill="white",stroke="transparent")


petala1 = Ellipse(width=30, height=75, center=Point(0,75/2),stroke="transparent", fill="purple") | repeat(15, rotate(360/15))
petala2 = Ellipse(width=30, height=75, center=Point(0,75/2),stroke="transparent") | repeat(15, rotate(360/15))
petala=petala1 + petala2

petalb1 = Ellipse(width=30, height=65, center=Point(0,65/2),stroke="transparent", fill="yellow") | repeat(15, rotate(360/15)) | rotate((360/15)*(3/2))
petalb2 = Ellipse(width=30, height=65, center=Point(0,65/2),stroke="transparent") | repeat(15, rotate(360/15)) | rotate((360/15)*(3/2))
petalb=petalb1 + petalb2

petalc1 = Ellipse(width=30, height=55, center=Point(0,55/2),stroke="transparent", fill="violet") | repeat(15, rotate(360/15))
petalc2 = Ellipse(width=30, height=55, center=Point(0,55/2),stroke="transparent") | repeat(15, rotate(360/15))
petalc=petalc1 + petalc2

circl= Circle(radius=47,fill="white",stroke="transparent")

flowerbase = petala + petalb + petalc +circl





z1=(Ellipse(width=37,height=50,fill="red",center=Point(0,20), stroke="transparent") | repeat(9,rotate(360/9))) 
z2=(Ellipse(width=23,height=30,fill="blue",center=Point(0,20), stroke="transparent") | repeat(9,rotate(360/9))) 
z3=(Ellipse(width=15,height=16,fill="violet",center=Point(0,20), stroke="transparent") | repeat(9,rotate(360/9))) 
z4=Circle(radius=10,stroke="white") + Circle(radius=7,stroke="white")
z=z1+z2+z3+z4

show(ellip,  outer, inner, polygn, cborder,cbase,flowerbase,z)