Pookkalam by Steffy Senson

Code

print('     TINKERHUB BEING THE TRADITION')
#Random colors function is added
#Background
BG = rectangle(fill= '#08503B', w=350, h=350)
bgl1= rectangle(fill= 'none',stroke='#466C5E', x=-200, w=50, h=350)| repeat(7, translate(x=50))
bgl2= rectangle(fill= 'none',stroke='#466C5E', y=-200, w=350, h=50)| repeat(7, translate(y=50))
bg1 = circle(r=150, fill='#f70000', fill_opacity=0.3, stroke='none')
bg2 = circle(r=155, fill='#f70000', fill_opacity=0.3, stroke='none')
show(BG, bgl1, bgl2, bg1, bg2)
#Inner border
def random_color():
    r = random(255)
    g = random(255)
    b = random(255)
    return color(r=r, g=g, b=b)
t1= ellipse(fill=random_color(), stroke=random_color(), x=0, y=0, w=215, h=104)
t2= ellipse(fill=random_color(), stroke=random_color(), x=0, y=0, w=205, h=103)
t3= ellipse(fill=random_color(), stroke=random_color(), x=0, y=0, w=195, h=102)
t4= ellipse(fill='#0c2675', stroke=random_color(), x=0, y=0, w=185, h=101)
t5= ellipse(fill=random_color(), stroke=random_color(), x=0, y=0, w=175, h=100)
t6= t1 + t2 + t3 + t5 + t4 | repeat(45,rotate(25))
show(t6)
#Outer buds
s4= circle(fill='#d45008', stroke='#730000',stroke_width=2, x=100, y=105, r=7)|repeat(100,rotate(4))
x1, y1 = -1, 150
x2, y2 =-1, 136
s5= line(x1, y1, x2, y2, stroke='black', fill_opacity=0.1) | repeat(100, rotate(4))
s6= s5 | repeat(4, rotate(35))
show(s5, s4, s6)
#Kombu intrument
k1= ellipse(w=40, h=40,x=-40, y=20,fill='none', stroke='#0a0701', stroke_width=2) | repeat(2, translate(y=-2))
show(k1)
#discord
d1 = ellipse(w=40, h=40, x=0, y=-50,fill='#5865f2', stroke='#5865f2')
d2 = ellipse(w=26, h=17, x=0, y=-50,fill='white', stroke='#46476e', stroke_width= 2)
d3 = ellipse(w=26, h=17, x=0, y=-50,fill='none', stroke='white', stroke_width=3)
d7 = circle(r=3, x=-3, y= -52, fill='#5865f2', stroke= 'none')
d8 = d1 + d2 +d7
show(d8)
#Head-Crown
h1 = rectangle(fill= 'red', stroke= 'none', x=0, y=40, w=60, h=12.5)
h2= rectangle(fill= 'orange', stroke ='none', x=0, y=50, w =60, h=12.5)
h3= ellipse(fill='red', stroke="none", x=0, y=60, w=59, h=70)
crown = h1 + h3 + h2
x1, y1 = -11, 96
x2, y2 = 10, 96
x3, y3 = -25, 78
x4, y4 = 25, 78
x5, y5 = -25, 73
x6, y6 = 25, 73
x7, y7 = -28, 69
x8, y8 = 28, 69
x9, y9 = -26, 78
x10, y10 = -21, 74
x11, y11 = -24, 74
x12, y12 = -19, 78
x13, y13 = -27, 52
x14, y14 = -24, 49
h6= line(x1, y1, x2, y2, stroke='#f5f500', stroke_width=4) + line(x3, y3, x4, y4, stroke='#4a963e', stroke_width=2) + line(x5, y5, x6, y6, stroke='white', stroke_width=8)
h7= line(x9, y9, x10, y10, stroke='#4a963e', stroke_width=2) + line(x11, y11, x12, y12, stroke='#4a963e', stroke_width=2) | repeat(6, translate(x=9))
h8= circle(r=3, x=-20, y= 63, fill='#f5f500', stroke= '#f5f500') | repeat(5, translate(x=10))
h9 = line(x13, y13, x14, y14, stroke='#f5f500', stroke_width=4) | repeat(8, translate(x=7))
h10 = circle(r=4.5, x=-10, y=91, fill='white', stroke= '#b0a927', stroke_width= 2)| repeat(2, translate(x=20))
h11=  circle(r=4.5, x=0, y=95, fill='white', stroke= '#b0a927', stroke_width= 2)
h12= line(x1=-29, y1=42, x2=-40, y2=23, stroke_width=3, stroke='red')
h13= line(x1=29, y1=42, x2=40, y2=23, stroke_width=3,  stroke='red')
head = h6 + h7 + h8 + h9 + h10 + h11 + h12 + h13
#Eyes
eye= ellipse(fill='white', x=-13, y=10, h=6, w=10) + circle(fill='black', x=-13, y=10, r=3) | repeat(2, translate(x=24))
brow= ellipse(x=-14, y=11, w=14, h=9, stroke_width=1)| repeat(2, translate(x=26))
eyeline1= line(x1=-14, y1=19, x2=-23, y2=12, stroke_width=2)| repeat(2, translate(x=28))
eyeline2= line(x1=-14, y1=19, x2=-5, y2=12, stroke_width=2)| repeat(2, translate(x=28))
eyes = eye + brow + eyeline1 + eyeline2
#Face
f1 = circle(fill= '#4da628', stroke ='none', r=16.1)
f2 = ellipse(fill= '#4da628', stroke ='none', x=0, y=0, w = 30, h=70) | rotate(35)
f3 = ellipse(fill= '#4da628', stroke ='none', x=0, y=0, w = 30, h=70) | rotate(145)
f4 = ellipse(fill= '#4da628', stroke ='none', x=0, y=5, w = 25, h=72) | rotate(0)
fa1 = f1 + f2 + f3 + f4
#Face
e1 = ellipse(fill= '#c90000', stroke = 'none', x=0, y=22.5, w=60, h=25) | rotate(0)
e2 = ellipse(fill= '#f50000', stroke = 'none', x=0, y=32, w=17.5, h=20) | rotate(0)
e3 = ellipse(fill= '#f5f500', stroke = 'none', x=0, y=20, w=70, h=42.5) | rotate(0)
e4 = ellipse(fill= '#f5f500', stroke = 'none', x=0, y=37.5, w=14, h=8) | rotate(0)
e5 = ellipse(fill= '#1ee854', stroke = 'none', x=0, y=30, w=70, h=45) | rotate(0)
#Face
e6 = ellipse(fill= 'white', stroke ='none', w = 44, h = 90) | rotate(45)
e7 = ellipse(fill= 'white', stroke ='none', w = 44, h = 100) | rotate(135)
e8 = ellipse(fill= 'white', stroke ='none', x=0, y=2.5, w = 42, h = 90) | rotate(0)
fe1 = e6 + e7 + e8
show(fe1, e5, e3, e1,fa1, e2, e4, crown, head, eyes)
#Earring
e9 = circle(r=9.38, fill='#f2ff00') | translate(x=30, y=25)
e10 = circle(r=10, fill='#FFFF2E') | translate(x=30, y=25)
e11=ellipse(h=17.4, w=6.25, fill='#eb0909', stroke ='none')|repeat(28,rotate(20)) | translate(x=30, y=25)
e12 = circle(r=6.25, fill='#FFFF8A') | translate(x=30, y=25)
e13 = circle(r=5.6, fill='#ff9100', stroke = 'none') | translate(x=30, y=25)
ear1 = e9 + e10 + e11 + e12 + e13
#Earring
e14 = circle(r=9.38, fill='#fbff00') | translate(x=-30, y=25)
e15 = circle(r=10, fill='#FFFF2E') | translate(x=-30, y=25)
e16 =ellipse(h=17.4, w=6.5, fill='#eb0909', stroke ='none')|repeat(28,rotate(20)) | translate(x=-30, y=25)
e17 = circle(r=6.5, fill='#FFFF8A') | translate(x=-30, y=25)
e18 = circle(r=5.6, fill='#f28b05', stroke = 'none') | translate(x=-30, y=25)
ear2 = e14 + e15 + e16 + e17 + e18
#Earring
e19 = circle(r=12.9, fill='#e2f205') | translate(x=36, y=3)
e20 = circle(r=16, fill='#FFFF2E') | translate(x=36, y=3)
e21=ellipse(h=20.4, w=12.5, fill='#eb0909', stroke ='red')|repeat(28,rotate(20)) | translate(x=36, y=3)
e22 = circle(r=9.25, fill='#FFFF8A') | translate(x=36, y=3)
e23 = circle(r=8.6, fill='#f2a305', stroke = 'none') | translate(x=36, y=3)
ear3 = e19 + e20 + e21 + e22 + e23
#Earring
e24 = circle(r=12.9, fill='#f2f205') | translate(x=-36, y=3)
e25 = circle(r=16, fill='#FFFF2E') | translate(x=-36, y=3)
e26=ellipse(h=20.4, w=12.5, fill='#eb0909', stroke ='red')|repeat(28,rotate(20)) | translate(x=-36, y=3)
e27 = circle(r=9.25, fill='#FFFF8A') | translate(x=-36, y=3)
e28 = circle(r=8.6, fill='#f2a305', stroke = 'none') | translate(x=-36, y=3)
ear4 = e24 + e25 + e26 + e27 + e28
show(ear1, ear2, ear4)
#Lips
l1= circle(fill='red',stroke ='none', x=-18, y=-15, r=2) | repeat(2, translate(x=37))
l2 = point(x=0, y=-20)
l3 = point(x=-4, y=-15)
l4 = point(x=-16, y=-15)
shape1 = polygon([l2, l3, l4], fill='red', stroke='#f20505')
l5 = point(x=1, y=-20)
l6 = point(x=3, y=-15)
l7 = point(x=16, y=-15)
shape2 = polygon([l5, l6, l7], fill='red', stroke='none')
show(l1, shape1, shape2)
#Nose
n1 = circle(r=.1, x=-4, y=-5, stroke='#135703')| repeat(10,translate(x=.3, y=1))
n2 = circle(r=.1, x=0, y=-5, stroke='green')| repeat(10,translate(x=.1, y=.1))
n3 = circle(r=.1, x=4, y=-5, stroke='white')| repeat(10,translate(x=-.3, y=1))
show(n1, n2, n3)
#Pookalam-Inside
bg3= ellipse(fill='#d6ba3e',stroke='none', fill_opacity=0.3, x=0, y=0, w=169, h=169)
show(bg3)
#Inside discord
id1 = line(stroke='#0c2675',stroke_width=6, x1=3,y1=-35,x2=5, y2=-60)
id2 = line(stroke='#0c2675',stroke_width=6, x1=5,y1=-35,x2=9, y2=-59)
id3 = line(stroke='#0c2675',stroke_width=6, x1=9,y1=-42,x2=12, y2=-56)
id5 = line(stroke='#f3eac5',stroke_width=6, x1=3, y1=38, x2=3, y2=-40)
show(id1, id2, id3, id5)
#discord
d11 = ellipse(w=26, h=24, x=0, y=-50,fill='none', stroke='white', stroke_width=3)
d12 = line(x1=4, y1=-38, x2=4, y2=-30, stroke='white', stroke_width=1, fill_opacity=0.3)
d13 = line(x1=16, y1=-50, x2=6, y2=-30, stroke='#7e7fbc', stroke_width=2, fill_opacity=0.3)
d14 = line(x1=15.3, y1=-40, x2=13.5, y2=-60, stroke='#7e7fbc', stroke_width=4, fill_opacity=0.3)
d5l = line(x1=-16, y1=-60, x2=-13, y2=-40, stroke='#7e7fbc', stroke_width=2, fill_opacity=0.3)#left
d6l = line(x1=-18, y1=-45, x2=-9, y2=-65, stroke='#7e7fbc', stroke_width=4, fill_opacity=0.3)#left
d17 = line(x1=2, y1=-65, x2=1, y2=-57, stroke='#7e7fbc', stroke_width=3,  fill_opacity=0.3)
d18 = circle(r=2.5, x=6, y= -52, fill='white', stroke= 'none')
id4= ellipse(fill='#7e7fbc',stroke='none', fill_opacity=0.3, x=10, y=-50, w=20, h=36)
d19 = d11 + d12 + d13 + d14 + d5l + d6l + d17 + d18 + id4
show(d19)
#pooklam-3
s1= circle(fill='#e30707', stroke='none',x=100, y=22, r=3)|repeat(100,rotate(4))
s2= circle(fill='#91BF23', stroke='none',x=100, y=10, r=3)|repeat(100,rotate(4))
s3= line(x1=125, y1=55, x2=124, y2=57, stroke='#47632b') |repeat(200,rotate(2))
pk2 = s1 + s2 + s3
show(pk2)
#Tinkerhub Logo
l2= line(x1=10, y1=36, x2=10, y2=-33, stroke='white', stroke_width=12)
l3= line(x1=18, y1=24, x2=18, y2=-28, stroke='white', stroke_width=16)
p1 = point(x=2, y=-8)
p2 = point(x=6, y=-3)
p3 = point(x=8, y=-8)
p4 = point(x=6, y=-13)
shape1 = polygon([p1, p2, p3, p4], fill='#225bab', stroke='#225bab') | repeat(10, rotate(13))#blue
p5 = point(x=2, y=-8)
p6 = point(x=6, y=-3)
p7 = point(x=8, y=-8)
p8 = point(x=6, y=-13)
shape2 = polygon([p5, p6, p7, p8], fill='#5fcbe3', stroke='#5fcbe3') | repeat(25, rotate(1))#light blue
p9 = point(x=2, y=-21)
p10 = point(x=6, y=-16)
p11 = point(x=8, y=-21)
p12= point(x=6, y=-26)
shape3 = polygon([p9, p10, p11, p12], fill='yellow', stroke='yellow') | repeat(38, rotate(4))#yellow
p13 = point(x=2, y=-33)
p14 = point(x=6, y=-28)
p15= point(x=8, y=-33)
p16 = point(x=6, y=-38)
shape4 = polygon([p13, p14, p15, p16], fill='#080963', stroke='#080963') | repeat(28, rotate(6))#dark blue
p17 = point(x=2, y=-33)
p18= point(x=6, y=-28)
p19 = point(x=8, y=-33)
p20 = point(x=6, y=-38)
shape5 = polygon([p17, p18, p19, p20], fill='#10c242', stroke='#10c242') | repeat(29, rotate(4))#green
p21 = point(x=2, y=-33)
p22 = point(x=6, y=-28)
p23 = point(x=8, y=-33)
p24 = point(x=6, y=-38)
shape6 = polygon([p21, p22, p23, p24], fill='#ab2222', stroke='#ab2222') | repeat(19, rotate(4))#dark red
p25 = point(x=2, y=-47)
p26 = point(x=7, y=-33)
p27 = point(x=9, y=-38)
p28 = point(x=7, y=-45)
shape7 = polygon([p25, p26, p27, p28], fill='white', stroke='white') | repeat(25, rotate(7))
l1= line(x1=3, y1=41, x2=4, y2=-45, stroke='white', stroke_width=5)
show(l2, l3, shape1, shape2, shape3, shape4, shape5, shape6, shape7, l1)
#Vanji
v1= ellipse(fill='#0c2675',stroke='none', x=-50, y=33, w=12, h=29) | rotate(37)
v2= ellipse(fill='#d6ba3e',stroke='none',fill_opacity=0.3,x=-50, y=33, w=12, h=29) | rotate(37)
v3= ellipse(fill= 'black', stroke='none', x=-60, y=20, w=20, h=40) | rotate(30)
p29 = point(x=-60, y=-13)
p30 = point(x=-40, y=-20)
p31 = point(x=-39, y=-34)
p32 = point(x=-55, y=-31)
shape8 = polygon([p29, p30, p31, p32], fill='black')
p33 = point(x=80, y=-9)
p34= point(x=43, y=-18)
p35= point(x=39, y=-28)
p36= point(x=55, y=-21)
shape9 = polygon([p33, p34, p35, p36], fill='black')
pl1= line(x1= 46, y1=-8, x2=53, y2=-30)
p37 = point(x=50, y=-6)
p38 = point(x=54, y=-8)
p39 = point(x=60, y=-28)
p40= point(x=54, y=-8)
p41 = point(x=50, y=-5)
shape10 = polygon([p37, p38, p39, p40, p41], fill='black') | repeat(3, translate(6.5))
pc1= circle(x=50, y=-10, r=2) | repeat(3, translate(6.5))
pl2 = line(x1=-70, y1=14, x2=-63, y2=-32, stroke='black')
pc2= circle(x=-55, y=-15, r=2) | repeat(3, translate(6.5))
show(v3,v1, v2, shape8, shape9, shape10, pl1, pc1, pl2, pc2)
#Petals-Inside
def random_color():
    r = random(255)
    g = random(255)
    b = random(255)
    return color(r=r, g=g, b=b)
pet = ellipse(x=-133, y=0, w=6,h=10,fill='yellow')| repeat(6,rotate(30))
pt2 = pet | repeat(85, rotate(35))
pet1 = ellipse(x=-110, y=0, w=6,h=10,fill='#0d505a')| repeat(6,rotate(30))
pt3 = pet1 | repeat(80, rotate(35))
pn = pt2 + pt3
show(pn)
#Petals
pt3 = ellipse(w=4, h=20,x=90, y=90,fill='green', stroke=random_color(), fill_opacity=0.3) | repeat(3, rotate(10)|scale(0.95))
pt4 = pt3 | repeat(75, rotate(35))
pt5 = ellipse(w=10, h=4,x=90, y=90,fill='#184d29', stroke=random_color(), fill_opacity=0.3 ) | repeat(3, rotate(30)|scale(0.95))
pt6 = pt5 | repeat(40, rotate(35))
show(pt4, pt6)
#Kombu
k2 = point(x=-40, y=39)
k3 = point(x=-32, y=40)
k4 = point(x=-36, y=32)
k5 = point(x=-42, y=38)
k6 = polygon([k2, k3, k4, k5], fill='#1f1501', stroke='#1f1501')
k7 = line(x1=-36, y1=39, x2=-50, y2=10, stroke='black')
k8 = line(x1=-44, y1=40, x2=-44, y2=35, stroke='black')
k9 = line(x1=-53, y1=36, x2=-53, y2=32, stroke='black')
k10 = line(x1=-58, y1=28, x2=-58, y2=24, stroke='black')
k11 = line(x1=-53, y1=8, x2=-53, y2=3, stroke='black')
k12 = k6 + k7 + k8 + k9 + k10 + k11
show(k12)
#Sun
sn1=  circle(r=10, x=60, y=35, fill='#f28202', stroke= '#f28202', stroke_width=3)
sn2 = circle(r=6, x=60, y=35, fill='#f5ac00', stroke= '#f5ac00', stroke_width=3)
sn3 = circle(r=3, x=60, y=35, fill='#f5d800', stroke= '#f5d800', stroke_width=3)
sun = sn1 + sn2  + sn3
show(sun)
#Birds
x15, y15= 65, 24
x16, y16= 71, 16
x17, y17= 71, 16
x18, y18= 72, 24
b1= line(x15, y15, x16, y16, stroke='black', stroke_width=1)| repeat(1, translate(x=2))
b2= line(x17, y17,x18, y18, stroke='black', stroke_width=1)| repeat(1, rotate(30))
bird= b1+ b2
b3= bird | translate(x=-20, y=10)
b4= bird | translate(x=-10, y=-10)
bird1= b3 + b4
show(bird, bird1)
#End