Pookkalam by Abhinav C Ramesh

Code

p1 = point(x=39, y=34)
p2 = point(x=37, y=43)
p3 = point(x=29, y=47)
p4 = point(x=33, y=37)

chakram_color = ["#ffff4d","#f1c927","#fe7301","#ff3300","#993300","#f8f7ed"]

chakram_color_out = ["#ffff4d","#f1c927","#fe7301","#ff3300","#cc2900","#cce6ff"]

layer1 = rectangle(w=204,h=204,fill="red", stroke="red") | repeat (20,rotate(50))

s1 = polygon(([p1, p2, p3,p4]),fill = "none",stroke="none")
for i in range(6) :
        s = polygon(([p1, p2, p3,p4]),fill = chakram_color_out[i], stroke_width=0.08)|rotate(i*10)
        s1 = combine ([s1,s])
s2 = s1|repeat(6,rotate(60))

s3 = s2|(rotate(9.2)|scale(1.1))
s4 = s3|(rotate(9.2)|scale(1.1))
s5 = s4|(rotate(9.2)|scale(1.1))
s6 = s5|(rotate(9.2)|scale(1.1))
s7 = s6|(rotate(9.2)|scale(1.1))
s8 = s7|(rotate(9.2)|scale(1.1))
s9 = s8|(rotate(9.2)|scale(1.1))
s10 = s9|(rotate(9.2)|scale(1.1))
s11 = s10|(rotate(9.2)|scale(1.1))

out = circle(r=146, fill="#223300", stroke="#223300")
inn = circle(r=81.1, fill="none", stroke_width="2.5", stroke="#225500")
c = circle(r=100, fill="#336600")

show(out)
show(layer1)

show(c,s7,s8,s9,s10,s11)


r1 = rectangle(w=110, h=110,fill=chakram_color[4],stroke="none") | repeat(6, rotate(15))
r2 = rectangle(w=105, h=105,fill=chakram_color[0],stroke="none") | repeat(6, rotate(15))
r3 = rectangle(w=100, h=100,fill=chakram_color[3],stroke="none") | repeat(6, rotate(15))
r4 = rectangle(w=95, h=95,fill=chakram_color[2],stroke="none") | repeat(6, rotate(15))
r5 = rectangle(w=95, h=95,fill=chakram_color[1],stroke="none") | repeat(6, rotate(15))
r6 = rectangle(w=90, h=90,fill="#66b3ff",stroke="none") | repeat(6, rotate(15))
show(r1,r2,r3,r4,r5,r6)


tp1 = point(x=0,y=75)
tp2 = point(x=5,y=14)
tp3 = point(x=-5,y=14)
t4 = polygon(([tp1,tp2,tp3]),fill="#223300",stroke_width="0.1")| repeat(24,rotate(15))
t4 = t4|rotate(7.5)
show(t4)

cir = circle(r=50, fill="#80bfff", stroke="none")
show(cir)

i1 = point(x=112 ,y=159)
i2 = point(x=118 ,y=151)
i3 = point(x=121 ,y=141)
i4 = point(x=122 ,y=128)
i5 = point(x=135 ,y=117)
i6 = point(x=143 ,y=111)
i7 = point(x=148 ,y=103)
i8 = point(x=155 ,y=100)
i9 = point(x=154 ,y=88)
i10 = point(x=162 ,y=85)
i11 = point(x=166 ,y=91)
i12= point(x=170 ,y=99)
i13= point(x=175 ,y=95)
i14 = point(x=178 ,y=89)
i15 = point(x=181 ,y=80)
i16 = point(x=188 ,y=74)
i17= point(x=182 ,y=67)
i18 = point(x=174 ,y=69)
i19 = point(x=168 ,y=74)
i20 = point(x=162 ,y=78)
i21 = point(x=155 ,y=77)
i22 = point(x=147 ,y=80)
i23 = point(x=137 ,y=76)
i24 = point(x=126 ,y=74)
i25 = point(x=121 ,y=67)
i26= point(x=121 ,y=59)
i27 = point(x=117 ,y=48)
i28 = point(x=122 ,y=40)
i29 = point(x=115 ,y=35)
i30 = point(x=107 ,y=37)
i31 = point(x=97 ,y=30)
i32 = point(x=90 ,y=35)
i33 = point(x=96 ,y=44)
i34 = point(x=100 ,y=53)
i35 = point(x=97 ,y=63)
i36= point(x=89 ,y=70)
i37 = point(x=82 ,y=82)
i38 = point(x=88 ,y=89)
i39 = point(x=68 ,y=93 )
i40 = point(x=81 ,y=97 )
i41 = point(x=76 ,y=101 )
i42= point(x=84 ,y=106 )
i43 = point(x=91 ,y=100 )
i44 = point(x=92 ,y=111 )
i45= point(x=94 ,y=123 )
i46 = point(x=101 ,y=138 )
i47 = point(x=104 ,y=149 )
i48 = point(x=112, y=158)
i49 = point(x=50,y=158)
i50 = point(x=50, y=10)
i51 = point(x=200, y=10)
i52 = point(x=200, y=158)

c1=circle(x=0,y=15,r=25,fill="#ff9933",stroke="none")
r1=rectangle(x=0,y=5,h=25,w=60,fill="white",stroke="none")
c2=circle(x=0,y=-8,r=25,fill="green",stroke="none")

back = combine([c1,c2,r1])|scale(0.8)

show(back)
ind = polygon([i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12,i13,i14,i15,i16,i17,i18,i19,i20,i21,i22,i23,i24,i25,i26,i27,i28,i29,i30,i31,i32,i33,i34,i35,i36,i37,i38,i39,i40,i41,i42,i43,i44,i45,i46,i47,i48,i49,i50,i51,i52], fill="#80bfff", stroke="none")|scale (y=-1)
india = ind |translate(x=-120,y=90)|scale(0.4)
show(india)


rect1 = rectangle(x=0,y=0,w=0,h=0, fill="none", stroke="none")
for i in range(5):
    rect = rectangle(x=38-(i*3),y=38-(i*3),w=6,h=6,fill = chakram_color[4-i],stroke="none")|scale(1)
    rect1 = combine([rect1,rect])
rect1= rect1|rotate(7.5)|repeat(24,rotate(15))

show(rect1)

chak = circle(r=75, stroke_width="4", stroke="blue")

tp1 = point(x=0,y=75)
tp2 = point(x=4,y=4)
tp3 = point(x=-4,y=4)
t4 = polygon(([tp1,tp2,tp3]),fill="blue",stroke="none")| repeat(24,rotate(15))
t4 = t4|rotate(7.5)
ashok = combine([chak,t4])|scale(0.06)|translate(x=-3.5, y=1)

show(ashok)