Pookkalam by Samyuktha P

Code

r = rectangle(w=300,h=300,fill = "#08503B")
lines =combine([line(x1=i,x2=i,y1=-150,y2=150,stroke="white", stroke_width=0.25) for i in range(-100,150,50)])
show(combine([r,lines,lines|rotate(90)]))

e = ellipse(w=290,h=290/3,fill = "#3d0c5c", stroke="white", stroke_width=3)|repeat(9,rotate(20))
c = circle(r=135,fill = "#b01e1e", stroke="white",stroke_width=4)
r1 = rectangle(w=184,h=184,fill = "#ed922b", stroke="none")|repeat(24,rotate(9))
r2 = rectangle(w=176,h=176,fill = "yellow", stroke="none")|repeat(24,rotate(9))
r3 = rectangle(w=168,h=168,fill = "#fcf590", stroke="none")|repeat(24,rotate(9))
c1 = circle(r=110, fill = "yellow", stroke="none")
c2 = circle(r=105, fill = "#de9014", stroke="none")
c3 = circle(r=100, fill = "#c99b0e", stroke="none")
e1 = ellipse(w=205,h=205/6, fill = "#9c4716", stroke="none")|repeat(18,rotate(10))
e2 = ellipse(w=190,h=190/6, fill = "#700416", stroke="none")|repeat(18,rotate(10))
e3 = ellipse(w=175,h=175/6, fill = "#0b2b0c", stroke="none")|repeat(18,rotate(10))
x=combine([e,c,r1,r2,r3,c1,c2,c3,e1,e2,e3])

#crown
c = circle(x=0,y=50,r=100*0.60, fill = "yellow", stroke="#F36636", stroke_width=2)
cc = circle(x=0,y=50,r=97*0.60, fill = "#eb3705", stroke="yellow")
c1 = circle(x=0,y=45,r=80*0.60, fill = "green", stroke="#1aab07", stroke_width=4)
c2 = circle(x=0,y=30,r=65*0.60, fill = "orange", stroke="#FFEF03", stroke_width=3)
c3 = circle(x=0,y=20,r=50*0.60, fill = "#FD3C01", stroke="#C75500", stroke_width=3)
x0 = combine([c,cc,c1,c2,c3])


e=ellipse(w=135*0.60, h=(135*0.60)/2,x=0,y=10, fill = "#C75500", stroke="orange", stroke_width=3)

#beard
e1 = ellipse(w=95*0.60, h=(95*0.60)/2.5, x=-10*0.6, y=-95*0.6, fill = "white", stroke = "none" ) | rotate(angle=20)
e2 = ellipse(w=95*0.60, h=(95*0.60)/2.5, x=10*0.6, y=-95*0.6, fill = "white", stroke = "none") | rotate(angle=340)
e3 = ellipse(w=75*0.60, h=(75*0.60)/2, x=-10*0.6, y=-90*0.6, fill = "white", stroke = "none") | rotate(angle=20)
e4 = ellipse(w=75*0.60, h=(75*0.60)/2, x=10*0.6, y=-90*0.6, fill = "white", stroke = "none") | rotate(angle=340)
x1 = combine([e1,e2,e3,e4])

#face
c4 = circle(x=0,y=-35*0.60,r=50*0.70, fill = "#3bbf0b", stroke="none")
r = rectangle(w=22,h=10,x=0,y=5, fill = "yellow", stroke = "none")
cc4 = circle(r=2.5,x=0,y=-2, fill = "orange", stroke="red")
cc5 = cc4|translate(y=6)
cc6 = cc4|translate(y=12)
l = line(x1=18,y1=-3,x2=4,y2=-6,stroke_width =2)
ll = l|translate(x=-18,y=-4)|rotate(-28)


#ear part
c5 = circle(x=60*0.60,y=0,r=15*0.60, fill="orange", stroke="green", stroke_width=2)
cc=circle(x=60*0.60,y=0,r=8.5*0.60, fill="orange", stroke="yellow", stroke_width=2.5)
cc1=circle(x=60*0.60,y=0,r=3*0.60, fill="#FD3C01", stroke="none")
c6 = c5 | translate(x=-120*0.60,y=0)
ccc=cc | translate(x=-120*0.60,y=0)
cc2=cc1 | translate(x=-120*0.60,y=0)
c7 = circle(x=65*0.60,y=-30*0.60,r=20*0.60, fill="yellow", stroke="green", stroke_width=2)
e71=ellipse(x=65*0.60,y=-30*0.60,w=36*0.60,h=(36*0.60)/5, fill="#FD3C01", stroke="none")
cc7 = circle(x=65*0.60,y=-30*0.60,r=10*0.60, fill="yellow", stroke="#FD3C01", stroke_width=3)
ccc7 = circle(x=65*0.60,y=-30*0.60,r=4*0.60, fill="#FD3C01", stroke="none")
c8 = c7 | translate(x=-125*0.60,y=0)
e72=e71 | translate(x=-125*0.60,y=0)
cc8=cc7 | translate(x=-125*0.60,y=0)
ccc8=ccc7 | translate(x=-125*0.60,y=0)
x2 = combine([c4,c5,cc,cc1,c6,ccc,cc2,c7,e71,cc7,ccc7,c8,e72,cc8,ccc8])

#eyes
e5 = ellipse(w=25*0.60,h=(25*0.60)/3,x=10,y=-10, fill = "white")
e6 = e5 | translate(x=-20,y=0)
eyeball1 = circle(x=10,y=-10,r=4*0.60, fill ="black")
eyeball2 = eyeball1 | translate(x=-20,y=0)
x3 = combine([e5,e6,eyeball1,eyeball2])

#nose
c1 = circle(x=8*0.60,y=-45*0.60,r=5*0.60, fill ="#20872f", stroke = "none")
c2 = c1 | translate(x=-10*0.60,y=0)
c3 = c1 | translate(x=-4*0.60,y=-2*0.60)
e1 = ellipse(w=(25*0.60)/2,h=25*0.60,x=2.5*0.60,y=-40*0.60, fill ="#25a137", stroke ="none")
c4 = circle(x=0.60,y=-20*0.6,r=2*0.60, fill ="yellow", stroke="none")
c5 = c4 | translate(x=0,y=5*0.60)
x4 = combine([c1,c2,c3,e1])|translate(x=-1.2)

#lips
lipline1 = line(x1=10,y1=-41,x2=0,y2=-41, stroke="red", stroke_width=1.8)
lipline2 = lipline1|translate(x=-10)
c1=circle(r=2,x=10,y=-40, fill = "red", stroke="none")
c2=c1 | translate(x=-20,y=0)
x5=combine([c1,c2,lipline1,lipline2])


l1 = ellipse(h = 10/1.5, w = 10 , fill="red", stroke="none", x=4,y=3)
l2 = l1 | translate(x=-8)
l3= ellipse(h = 10/1.2, w = 20 , fill="red", stroke="none")
lip = combine([l1,l2,l3])| translate(y=-60) | scale(0.7)

def dot(f,y):
    d1 = circle(fill=f,stroke="none",r=2.5,y= y)
    d2,d4 = d1 | translate(x=20,y=-4),d1 | translate(x=35,y=-12)
    d3 = d2 | translate(x=-40)
    d5 = d4 | translate(x=-70)

    return combine([d1,d2,d3,d4,d5])

dots = combine([dot("yellow",100),dot("orange",80),dot("#fcd617",20)])

k = combine([x0,e,dots,x1,x2,x3,x4,c4,c5,x5,lip,r,cc4,cc5,cc6,l,ll])| scale(0.8) | translate(y=-15)
show(combine([x,k]))