Pookkalam by mohammedafeef

Code

#To create circles
def createCircle(radius, color):
    show(circle(r=radius, fill = color, stroke = 'none'))
    
#To create the elliptical shape
def squareLayer(side, color, mainRotate, rep, initialRotate = 0):
    show(rectangle(w=side, h=side, fill=color, stroke='none') | rotate(initialRotate) | repeat(rep,  rotate(mainRotate)))

#To create the inner Special square combination
def specialShape(color, initialRotate = 0):
    show(polygon([
        point(0,0),
        point(28.2842712,28.2842712),
        point(56.5685425, 0),
        point(40,-15.5),
        point(40,0)
        ],
        fill = color,
        stroke = "none"
    ) | rotate(initialRotate) |repeat(4,rotate(90)))
        
        
#creating the shape
#outer circle
createCircle(150, '#412633')

#elliptical shapes
squareLayer(211, '#9b1f1f', 30, 10)
squareLayer(173, '#ea6e1b', 30, 10, 15)
squareLayer(141, '#ccc113', 30, 10)
squareLayer(115, '#f1ede0', 30, 10, 15)
#inner ring
createCircle(66, '#991d26');
createCircle(60, '#5a5e0e');

#deep inner shape
specialShape('#dfdcd1')
specialShape('#dcc81e', 45)
#single dot
createCircle(2,"#79165a")