Pookkalam by Thashib Tk

Code

def happyonam(stroke="#9e0000", stroke2="#9e0000", str_width=2):
    h1= line(x1=-50,y1=0,x2=-50,y2=-20,stroke=stroke,stroke_width=str_width)+line(x1=-50,y1=-10, x2=-43, y2=-10,stroke=stroke,stroke_width=str_width)+line(x1=-43,y1=0,x2=-43,y2=-20,stroke=stroke,stroke_width=str_width)
    a1= line(x1=-40,y1=0,x2=-40,y2=-20,stroke=stroke,stroke_width=str_width)+line(x1=-40,y1=0,x2=-30,y2=-20,stroke=stroke,stroke_width=str_width)+line(x1=-40,y1=-10,x2=-30,y2=-10,stroke=stroke,stroke_width=str_width)
    p1=line(x1=-26,y1=0, x2=-26, y2=-20,stroke=stroke,stroke_width=str_width)+circle(r=5, x=-20, y=-5,stroke=stroke,stroke_width=str_width)
    p3=line(x1=-10,y1=0,x2=-10,y2=-20,stroke=stroke,stroke_width=str_width)+circle(r=5, x=-5,y=-5,stroke=stroke,stroke_width=str_width)
    y1=line(x1=10,y1=0,x2=10,y2=-20,stroke=stroke,stroke_width=str_width)+line(x1=3,y1=0,x2=10,y2=-10,stroke=stroke,stroke_width=str_width)

    o1 = circle(r=10,x=-25,y=-35,stroke=stroke2,stroke_width=str_width)
    n1 = line(x1=-10,y1=-25,x2=-10,y2=-46,stroke=stroke2,stroke_width=str_width)+line(x1=-10,y1=-25,x2=0, y2=-46,stroke=stroke2,stroke_width=str_width)+line(x1=0,y1=-25,x2=0,y2=-46,stroke=stroke2,stroke_width=str_width)
    a1a= line(x1=5,y1=-25,x2=5,y2=-46,stroke=stroke2,stroke_width=str_width)+line(x1=5,y1=-25,x2=15,y2=-46,stroke=stroke2,stroke_width=str_width)+line(x1=5,y1=-37,x2=15,y2=-37,stroke=stroke2,stroke_width=str_width)
    m1 = line(x1=20,y1=-25,x2=20,y2=-46,stroke=stroke2,stroke_width=str_width)+line(x1=20,y1=-25,x2=30,y2=-36,stroke=stroke2,stroke_width=str_width)+line(x1=30,y1=-36,x2=40,y2=-25,stroke=stroke2,stroke_width=str_width)+line(x1=40,y1=-25,x2=40,y2=-46,stroke=stroke2,stroke_width=str_width)
    hpyon = h1+a1+p1+p3+y1+o1+n1+a1a+m1
    return hpyon

def flower():
    petal=ellipse(x=8,w=22,h=10,stroke="none",fill='#3dff3d')| repeat(10,rotate(45)) 
    bud2= circle(r=10, fill="white", stroke="none")
    bud=circle(r=5,fill='#FF0000',stroke="none")
    fl= petal + bud2 +bud
    return fl

def ashok():
    c1=circle(r=50,fill="#000000")
    c3=circle(r=9,x=-40,y=-16,fill="#00dbdb",stroke="#f57905")|repeat(12,rotate(30))
    c5=circle(r=7,x=0,y=-132,fill="#FF00FF",stroke="white")|repeat(12,rotate(30))
    e2=ellipse(w=100,h=5,fill="#005500",stroke="yellow")|repeat(10,rotate(30))
    c6=circle(r=18,fill="#ffff3d",stroke="#550000",stroke_width="5")
    c7=circle(r=10,fill="#ff00bb",stroke="#ff00bb")
    c8=circle(r=3,x=-40,y=-16,fill="red",stroke="rose")|repeat(12,rotate(30))
    ash=c1+e2+c6+c7+c3+c8
    return ash

def ring():
    cir1 = circle(r=5, x=-55,y=56, fill="white") | repeat(5, translate(x=25))
    cir2 = circle(r=5, x=-45,y=56, fill="yellow") | repeat(5, translate(x=25))
    tri1 = polygon([point(x=-42, y=52),point(x=-38, y=60), point(x=-34, y=52)], fill="#5cffff") | repeat(4, translate(x=25))
    rink = cir1+ cir2+ tri1
    return rink

def kani():
    blufl = ellipse(y=5,w=2.5,h=10,stroke="blue",stroke_width = 1,fill="#2a9ef7")| repeat(50,rotate(145))
    yelb= circle(r=5, fill="yellow")
    flo= blufl + yelb
    return flo

c1a = circle(r=150,fill="#0000bd")
cinc=circle(r=5, x=0, y=145, fill="#3dff3d") | repeat(50, rotate(10))
c1b = circle(r=140,fill="#ffff5c")

circles = c1a + cinc +c1b

square1a = rectangle(w=250, h=250 , fill = "#0000bd",stroke="none")
square1b = rectangle(w=230, h=230 , fill = "#ff2e96",stroke="none")

chakra= ashok() | translate(x=-65,y=65) | repeat(4, rotate(90))

pu= flower() | translate(x=0, y=100)

square2 = rectangle(w=200, h=200, fill="#0000bd",stroke="yellow")  + rectangle(w=175, h=175, fill="#ff2e96") | rotate(45)
square3 = rectangle(w=125,h=125, fill="#8e2525", stroke="#5cffff", stroke_width=2) | repeat(10, rotate(10))
square4 = rectangle(w=125,h=125, fill="#ffc7e3")

pu= flower() | translate(x=0, y=100) | repeat(4, rotate(90))

#boat
men= circle(r=5,x=-30, y=35, fill="white") + line(x1=-30, y1=35, x2=-50, y2=0, stroke="white") | repeat(3, translate(x=25))
boat2 = polygon([point(x=50, y=25),point(x=-60, y=25),point(x=-50, y=0)],fill="black")
boat1 = polygon([point(x=-50, y=0) ,point(x=50, y=0),point(x=60, y=50)], fill="black")
thoni =  boat2 + boat1 + men 
#happyonam
write= happyonam()
row = ring()
row2 = row|repeat(2 ,rotate(180))

cnt = kani() | translate(x=30, y=-12)
cnt2 = kani() | translate(x=-48, y=-35)



show(circles, square1a,square1b,chakra, square2, square3,square4,pu,thoni,write,row,row2,cnt,cnt2)