Pookkalam by Alby Joseph

Code


#outer_circles
c1 = circle(r=85,fill="red",stroke="none")
c2 = circle(r=70,fill="yellow",stroke="none")
c3 = circle(r=65,fill="maroon",stroke="none")
c4 = circle(r=50,fill="#184D47",stroke="none")
c5 = circle(x=0,y=-10,r=40,fill="maroon",stroke="none")

#details of outer circles
i_c = circle(x=78, y=7, r=4,fill="orange",stroke="none") | repeat(24, rotate(7.5))
i_e = ellipse(x=55, y=5, w=8,h=3.5, fill="yellow",stroke = "none")|repeat(26, rotate(7))

in_e1 = ellipse(x=30,y=0,w=20,h=10,fill = "white",stroke = "none")|repeat(7, rotate(30))
in_e2 = ellipse(x=27,y=0,w=12,h=8,fill = "maroon",stroke = "none")|repeat(7, rotate(30))

final1 = circle(r=0,stroke="none")
for i in range(3):
    in_e1 = ellipse(w=20,h=10,fill = "white",stroke = "none")| scale(pow(1.03,i))
    in_e2 = ellipse(w=12,h=8,fill = "maroon",stroke = "none")| scale(pow(1.03,i))
    in_e1 = in_e1 |translate(x=20-i*2,y=0)|rotate(i* 28)
    in_e2 = in_e2 |translate(x=22-i*2,y=0)|rotate(i* 28)
    in_e = combine([in_e1,in_e2])
    final1 = combine([final1,in_e])

in_enew1 =  ellipse(w=20,h=10,fill = "white",stroke = "none")| scale(pow(1.03,5))|rotate(90)|translate(y=20)
in_enew2 =  ellipse(w=12,h=8,fill = "maroon",stroke = "none")| scale(pow(1.03,5))|rotate(90)|translate(y=21)
in_enew = combine([in_enew1,in_enew2])

for i in range(3):
    in_e1 = ellipse(w=20,h=10,fill = "white",stroke = "none")| scale(pow(1.03,i))
    in_e2 = ellipse(w=12,h=8,fill = "maroon",stroke = "none")| scale(pow(1.03,i))
    in_e1 = in_e1 |translate(x=-20+i*2,y=0)|rotate(i* -28)
    in_e2 = in_e2 |translate(x=-22+i*2,y=0)|rotate(i* -28)
    in_e = combine([in_e1,in_e2])
    final1 = combine([final1,in_e])

d1 = point(x=6.5,y=0)
d2 = point(x=0,y=3)
d3 = point(x=-6.5,y=0)
d4 = point(x=0,y=-3)
final2 = circle(r=0,stroke="none")
for i in range(6):
    d = polygon([d1,d2,d3,d4],fill="yellow",stroke="none")| scale(pow(1.05,i))
    d = d |translate(x=45-i,y=0)|rotate(i* 15)
    final2 = combine([final2,d])

dnew = polygon([d1,d2,d3,d4],fill="yellow",stroke="none")| scale(pow(1.05,7))|rotate(90)|translate(y=41)
    
for i in range(6):
    d = polygon([d1,d2,d3,d4],fill="yellow",stroke="none")| scale(pow(1.05,i))
    d = d |translate(x=-45+i,y=0)|rotate(i*-15)
    final2 = combine([final2,d])

final2 = combine([final2,dnew])    

#crown
cr1 = circle(y=-8,r=24,fill="yellow",stroke="none")|translate(x=0,y=-9)
cr2 = circle(y=-8,r=27,fill="orange",stroke="none")|translate(x=0,y=-9)
cr3 = circle(y=-9,r=31,fill="red",stroke="none")|translate(x=0,y=-9)

pottu = circle(y=-3,r=4,fill="red",stroke="none")
s = circle(x=12, y=8, r=2,fill="white")
s1 = s | repeat(2, scale(1.39))
s2 = s1 | repeat(6, rotate(20))
s2 = s2|translate(x=0,y=-15)

#spike
cp1 = point(x=0,y=70)
cp2 = point(x=20,y=34)
cp3 = point(x=-20,y=34)
spike = polygon(([cp1,cp2,cp3]),fill="maroon",stroke_width="0.1")| repeat(20,rotate(18))
spike = spike|rotate(11.25)

#thala
e1 = ellipse(x=0,y=-30,w=50,h=65,fill="#FF7733")

#facial
ear1a = circle(x=-28,y=-20,r=13,fill="orange",stroke="none")
ear2a = ear1a|scale(x=-1)
eara = combine([ear1a,ear2a])

ear1b = circle(x=-28,y=-20,r=7,fill="yellow",stroke="none")
ear2b = ear1b|scale(x=-1)
earb = combine([ear1b,ear2b])

ear1c = circle(x=-28,y=-20,r=5,fill="white",stroke="none")
ear2c = ear1c|scale(x=-1)
earc = combine([ear1c,ear2c])

i1 = ellipse(x=11,y=-25,w=9,h=5,fill="white",stroke="none")
i2 = i1|scale(x=-1)

iball1 = circle(x=11,y=-25,r=2,fill="#A73489",stroke_width=0.5)
iball2 = iball1|scale(x=-1)

#nose
n1 = point(x=0 ,y=-28)
n2 = point(x=5 ,y=-38)
n3 = point(x=-5,y=-38)
n = polygon([n1,n2,n3],fill="black",stroke="none")
nc1 = circle(x=2.7,y=-38,r=3,fill="black",stroke="none")
nc2 = nc1|scale(x=-1)

down_c1a = circle(x=-40 ,y=-60,r=18,fill="orange",stroke="none")
down_c1b = circle(x=-40 ,y=-60,r=18,fill="orange",stroke="none")|scale(x=-1)
down_c1 = combine([down_c1a,down_c1b])

down_c2a = circle(x=-40 ,y=-60,r=12,fill="yellow",stroke="none")
down_c2b = circle(x=-40 ,y=-60,r=12,fill="yellow",stroke="none")|scale(x=-1)
down_c2 = combine([down_c2a,down_c2b])

down_c3a = circle(x=-40 ,y=-60,r=6,fill="white",stroke="none")
down_c3b = circle(x=-40 ,y=-60,r=6,fill="white",stroke="none")|scale(x=-1)
down_c3 = combine([down_c3a,down_c3b])

#downtrap
dta1 = point(x=90,y=-20)
dta2 = point(x=-90,y=-20)
dta3 = point(x=-82.5,y=-35)
dta4 = point(x=82.5,y=-35)
dtb1 = point(x=83,y=-25)
dtb2 = point(x=-83,y=-25)
dtb3 = point(x=-80,y=-32)
dtb4 = point(x=80,y=-32)
dta = polygon(([dta1,dta2,dta3,dta4]),fill="orange",stroke="none")
dtb = polygon(([dtb1,dtb2,dtb3,dtb4]),fill="yellow",stroke="none")

ct1a = circle(x=-45,y=-27.5,r=5,fill="orange",stroke="none")
ct1b = circle(x=45,y=-27.5,r=5,fill="orange",stroke="none")
ct1c = circle(x=-65,y=-27.5,r=5,fill="orange",stroke="none")
ct1d = circle(x=65,y=-27.5,r=5,fill="orange",stroke="none")

ct2a = circle(x=-45,y=-27.5,r=2.5,fill="yellow",stroke="none")
ct2b = circle(x=45,y=-27.5,r=2.5,fill="yellow",stroke="none")
ct2c = circle(x=-65,y=-27.5,r=2.5,fill="yellow",stroke="none")
ct2d = circle(x=65,y=-27.5,r=2.5,fill="yellow",stroke="none")

#forehead

ey1 = point(x=321 ,y=6)
ey2 = point(x=283 ,y=71)
ey3 = point(x=233 ,y=134)
ey4 = point(x=185 ,y=174)
ey5 = point(x=144 ,y=199)
ey6 = point(x=106 ,y=216)
ey7 = point(x=79 ,y=226)
ey8 = point(x=63 ,y=236)
ey9 = point(x=51 ,y=249)
ey10 = point(x=43 ,y=267)
ey11= point(x=40 ,y=283)
ey12 = point(x=41 ,y=305)
ey13 = point(x=49 ,y=328)
ey14 = point(x=59 ,y=342)
ey15 = point(x=69 ,y=356)
ey16= point(x=88 ,y=376)
ey17 = point(x=107 ,y=393)
ey18 = point(x=131 ,y=408)
ey19 = point(x=155 ,y=417)
ey20 = point(x=177 ,y=424)
ey21 = point(x=203 ,y=431)
ey22 = point(x=229 ,y=436)
ey23 = point(x=262 ,y=435)
ey24 = point(x=298 ,y=429)
ey25 = point(x=328 ,y=418)
ey26 = point(x=362 ,y=402)
ey27 = point(x=303 ,y=384)
ey28 = point(x=427 ,y=351)
ey29 = point(x=463 ,y=300)
ey30 = point(x=492 ,y=221)
ey31 = point(x=465 ,y=222)
ey32 = point(x=429 ,y=218)
ey33 = point(x=386 ,y=198)
ey34 = point(x=353 ,y=167)
ey35 = point(x=333 ,y=129)
ey36 = point(x=323 ,y=94)
eye1 = polygon([ey1,ey2,ey3,ey3,ey4,ey5,ey6,ey7,ey8,ey9,ey10,ey11,ey12,ey13,ey14,ey15,ey16,ey17,ey18,ey19,ey20,ey21,ey22,ey23,ey24,ey25,ey26,ey27,ey28,ey29,ey30,ey31,ey32,ey33,ey34,ey35,ey36],fill="black")|translate(x=-35,y=150)|scale(0.055)
eye1 = eye1|scale(y=-1)
eye2 = eye1|scale(x=-1)

f1 = point(x=12,y=13)
f2 = point(x=25,y=109)
f3 = point(x=38,y=145)
f4 = point(x=63,y=176)
f5 = point(x=117,y=220)
f6 = point(x=306,y=315)
f7 = point(x=537,y=186)
f8 = point(x=565,y=152)
f9 = point(x=581,y=112)
f10 = point(x=589,y=73)
f11 = point(x=594,y=21)
f12 = point(x=510,y=22)
f13 = point(x=496,y=62)
f14 = point(x=483,y=95)
f15 = point(x=469,y=116)
f16 = point(x=439,y=141)
f17 = point(x=296,y=212)
f18 = point(x=162,y=141)
f19 = point(x=140,y=118)
f20 = point(x=123,y=89)
f21 = point(x=110,y=56)
f22 = point(x=103,y=15)

f = polygon([f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22],fill="black")|scale(0.039)|translate(x=-12,y=-1)
f = f|scale(y=-1)
f = f|scale(y=1.6)

#lip
l1 =point(x=29,y=75)
l2 =point(x=111,y=30)
l3 =point(x=125,y=24)
l4 =point(x=138,y=24)
l5 =point(x=150,y=31)
l6 =point(x=176,y=50)
l7 =point(x=188,y=54)
l8 =point(x=200,y=49)
l9 =point(x=222,y=29)
l10 =point(x=232,y=25)
l11 =point(x=246,y=25)
l12 =point(x=261,y=31)
l13 =point(x=284,y=45)
l14 =point(x=333,y=75)
l15 =point(x=304,y=82)
l16 =point(x=278,y=89)
l17 =point(x=248,y=93)
l18 =point(x=217,y=94)
l19 =point(x=191,y=95)
l20 =point(x=156,y=93)
l21 =point(x=130,y=91)
l22 =point(x=96,y=86)
l23 =point(x=70,y=81)
l24 =point(x=46,y=77)

l = polygon([l1,l2,l3,l4,l5,l6,l7,l8,l9,l10,l11,l12,l13,l14,l15,l16,l17,l18,l19,l20,l21,l22,l23,l24],fill="#E60000")|scale (0.07)|translate(x=-13,y=43)
l = l|scale(y=-1)

ld1 = point(x=40,y=85)
ld2 = point(x=54,y=82)
ld3 = point(x=74,y=88)
ld4 = point(x=95,y=94)
ld5 = point(x=114,y=97)
ld6 = point(x=134,y=100)
ld7 = point(x=156,y=100)
ld8 = point(x=179,y=100)
ld9 = point(x=199,y=100)
ld10 = point(x=225,y=97)
ld11 = point(x=254,y=93)
ld12 = point(x=275,y=89)
ld13 = point(x=294,y=84)
ld14 = point(x=314,y=82)
ld15 = point(x=327,y=87)
ld16 = point(x=319,y=97)
ld17 = point(x=308,y=106)
ld18 = point(x=289,y=117)
ld19 = point(x=261,y=128)
ld20 = point(x=229,y=136)
ld21 = point(x=201,y=139)
ld22 = point(x=171,y=141)
ld23 = point(x=137,y=140)
ld24 = point(x=110,y=132)
ld25 = point(x=85,y=121)
ld26 = point(x=62,y=109)
ld27 = point(x=47,y=98)

ld = polygon([ld1,ld2,ld3,ld4,ld5,ld6,ld7,ld8,ld9,ld10,ld11,ld12,ld13,ld14,ld15,ld16,ld18,ld19,ld20,ld21,ld22,ld23,ld24,ld25,ld26,ld27],fill="red",stroke="none")|scale (0.07)|translate(x=-13,y=42) 
ld = ld|scale(y=-1)

#meesha
m1 = point(x=12,y=328)
m2 = point(x=28,y=323)
m3 = point(x=51,y=317)
m4 = point(x=72,y=307)
m5 = point(x=96,y=292)
m6 = point(x=121,y=270)
m7 = point(x=147,y=239)
m8 = point(x=170,y=200)
m9 = point(x=182,y=170)
m10 = point(x=192,y=141)
m11= point(x=214,y=111)
m12 = point(x=233,y=89)
m13 = point(x=267,y=65)
m14 = point(x=294,y=50)
m15 = point(x=328,y=40)
m16= point(x=359,y=34)
m17 = point(x=387,y=33)
m18 = point(x=416,y=35)
m19 = point(x=436,y=39)
m20 = point(x=463,y=47)
m21 = point(x=432,y=50)
m22 = point(x=408,y=55)
m23 = point(x=385,y=59)
m24 = point(x=362,y=68)
m25 = point(x=340,y=81)
m26 = point(x=318,y=95)
m27 = point(x=302,y=107)
m28 = point(x=285,y=120)
m29 = point(x=266,y=142)
m30 = point(x=252,y=158)
m31 = point(x=239,y=177)
m32 = point(x=231,y=196)
m33 = point(x=225,y=212)
m34 = point(x=216,y=232)
m35 = point(x=206,y=251)
m36 = point(x=193,y=271)
m37 = point(x=173,y=291)
m38 = point(x=157,y=306)
m39 = point(x=135,y=318)
m40 = point(x=112,y=328)
m41 = point(x=83,y=335)
m42 = point(x=56,y=338)
m43 = point(x=32,y=335)

ma = polygon([m1,m2,m3,m4,m5,m6,m7,m8,m9,m10,m11,m12,m13,m14,m15,m16,m17,m18,m19,m20,m21,m22,m23,m24,m25,m26,m27,m28,m29,m30,m31,m32,m33,m34,m35,m36,m37,m38,m39,m40,m41,m42,m43],fill="white",stroke="black")|scale(0.046)|translate(x=6,y=34)
ma = ma|scale(y=-1)
mb = ma|scale(x=-1) 

#val
val = polygon([m1,m2,m3,m4,m5,m6,m7,m8,m9,m10,m11,m12,m13,m14,m15,m16,m17,m18,m19,m20,m21,m22,m23,m24,m25,m26,m27,m28,m29,m30,m31,m32,m33,m34,m35,m36,m37,m38,m39,m40,m41,m42,m43],fill="white",stroke="green")|rotate(38)|scale(0.046)|translate(x=6,y=34)
val = val|scale(y=-1)|translate(x=30,y=20)
val1 = val|scale(3)|translate(x=-70,y=65)
val2 = val1|scale(x=-1)

#background
br = rectangle(y=-12,w=170,h=18,fill="black",stroke="none")
be = ellipse(y=-70,w=45,h=20,fill="yellow",stroke="none")
bb = ellipse(y=-45,w=140,h=60,fill="black",stroke="none")
bo = ellipse(y=-63,w=30,h=20,fill="#FF7733",stroke="none")

#most_out
r5 = rectangle(w=140, h=140,fill="white",stroke="none") | repeat(9, rotate(10))
r4 = rectangle(w=150, h=150,fill="yellow",stroke="none") | repeat(9, rotate(10))
r3 = rectangle(w=160, h=160,fill="orange",stroke="none") | repeat(9, rotate(10))
r2 = rectangle(w=170, h=170,fill="red",stroke="none") | repeat(9, rotate(10))
r1 = rectangle(w=180, h=180,fill="maroon",stroke="none") | repeat(9, rotate(10))



show(r1,r2,r3,r4,r5)
show(c1,i_c,c2,spike,c3,c4,i_e,c5,in_e1,in_e2,final1,final2,in_enew)
show(br,bb,be,bo,val1,val2)
show(cr3,cr2,cr1,down_c1,down_c2,down_c3,dta,dtb,ct1a,ct1b,ct1c,ct1d,ct2a,ct2b,ct2c,ct2d)
show(eara,earb,earc,e1,eye1,eye2,i1,i2,iball1,iball2,nc1,nc2,n,pottu)
show(f,l,ld,ma,mb)