Pookkalam by Athulraj vm

Code

c1 = circle(r=150, fill='#212306') 

show(c1)

def square(color, side):

     return rectangle (w=side, h=side,fill=color, stroke = 'none')

s1 = square(side = 212.5,color='#a92822') | repeat(10,rotate(10))

s2 = square(side = 198,color= '#F36636') | rotate(5) | repeat(10,rotate(10))

s3 = square(side = 182,color= '#E3BD36') | repeat(10,rotate(10))

s4 = square(side = 168,color= '#F8E63D') | rotate (5) | repeat (10, rotate (10))

s5 = square(side = 155,color='#FEFDF3') | repeat(10,rotate(10))

show(s1,s2,s3,s4,s5)

c2 = circle(r=100,fill= ' #14660b ')

show(c2)

c3 = circle(r= 94,fill= '#f2f2f2 ')

show(c3)

def inner_box_ring():

    shape = rectangle(h=13, w=16, fill='#E3BD36', y=-32, stroke='none')

    for i in range(1, 13) :

        if i % 2 == 0:

            shape = shape + rectangle(h=12, w=17, fill='#E3BD36', y=-32, stroke='none') |  rotate(30)

        else:

            shape = shape + rectangle(h=12, w=17, fill='#36a810', y=-32, stroke='none') |  rotate(30)

    return shape

inner_c = circle(r=94, fill='#fa5923') + circle(r=80, fill='#e8d60e')+inner_box_ring()

inner_button = circle(r=60, fill='#e0e0e0', stroke_width=3) 

inner_line_ring = line(x1=60, y1=0, x2=94, y2=0, stroke_width=3) | repeat(12, rotate(30)) | rotate(15)

show(inner_c,inner_button, inner_line_ring)

middle_c = circle(r=50, fill=' #24170c')

white_layer = square(side=63,color='#FEFDF3') | repeat(3,  rotate(30))

pink_layer = square(side=53,color='#E65A99') | repeat(3,  rotate(30)) 

red_layer = square(side=43,color='#AE2924') | repeat(3,  rotate(30))

green_layer = square(side=33,color='#212306') | repeat(5,  rotate(30))

p1 = point(x=-20, y=0)

p2 = point(x=20, y=0)

p3 = point(x=0, y=95)

triangle_ring = polygon([p1, p2, p3], fill='#89ad2b') + ellipse(w=6, h=15, x=0, y=65, fill='#a72bad') | repeat(12, rotate(30))

show(middle_c, white_layer, pink_layer, red_layer,triangle_ring, green_layer)

c5 = circle(r=40,fill= '#000000')
show(c5)
c6 = circle(r=34,fill='#dce6df')
show(c6)
c7 = circle(r=34,fill='#e06d1b')
show(c7)
c8 = circle(r=29,fill='#dbd330')
show(c8)
c9 = circle(r=25,fill='#f2f2f2')
show(c9)
middle_c = circle(r=50, fill='#000000')

white_layer = square(side=63,color='#FEFDF3') | repeat(3,  rotate(30))

pink_layer = square(side=53,color='#E65A99') | repeat(3,  rotate(30)) 


red_layer = square(side=43,color='#AE2924') | repeat(3,  rotate(30))

green_layer = square(side=33,color='#212306') | repeat(5,  rotate(30))

p1 = point(x=-5, y=0)
p2 = point(x=5, y=0)
p3 = point(x=0, y=23)

triangle_ring = polygon([p1, p2, p3], fill='#F36636') + ellipse(w=6, h=4, x=0, y=17, fill='#F8E63D') | repeat(12, rotate(30))

show(middle_c, white_layer, pink_layer, red_layer,triangle_ring, green_layer)
c11 = circle(r=15, fill=' #cc4d12')
show(c11)
c12 = circle(r=10,fill= ' #debf10')
show(c12)
shape21 = circle  (x=3,y=0,r=  3,fill='#fcfdff') |   repeat(6, rotate(60))
show(shape21)
c21= circle(r=2,fill=' #f77911')
show(c21)