Pookkalam by Royal Babu

Code

#background
c1 = rectangle(w=300, h=300, fill="white", stroke="none") 
show(c1)
def random_color():
    r = random(255)
    g = random(255)
    b = random(255)
    return color(r=r, g=g, b=b)

def owndes(x, y ,fill):
    c1 = circle(x=x, y=y-3, r=8, fill=fill, stroke="none")
    c2 = ellipse(x=x, y=y, w=30 ,h=40, fill=fill, stroke="none") | translate(x=7, y=-30)
    y=y-22
    p1 = point(x=x-6, y=y)
    p2 = point(x=x+20, y=y)
    p3 = point(x=x+16, y=y+10)
    p4 = point(x=x+8, y=y+22)
    p5 = point(x=x+0, y=y+24)
    p6 = point(x=x-6, y=y)
    shape = polygon([p1, p2, p3, p4, p5, p6] ,fill=fill, stroke="none" ) 
    
    return c1 + c2 + shape 

#constelation
def random_generator_out():
    if(int(random(0,20)%2)):
        return(random(50,150)) 
    else:
        return(random(-50,-150))    
def constelation():
    c = circle(x=random_generator_out(), y=random_generator_out(), r=random(2,8), fill=random_color() ,stroke="none")
    return c

for each in range(100):
    d = constelation()
    show(d)
    
# flower ellipse
e1=ellipse(h=200,w=80,fill="#880627", stroke="none")|repeat(6,rotate(60))
e2=ellipse(h=250,w=80,fill="#aa0831",stroke="none")|repeat(6,rotate(60))|scale(0.75)
e3=ellipse(h=250,w=80,fill="#cc0a3b",stroke="none")|repeat(6,rotate(60))|scale(0.65)
e4=ellipse(h=250,w=80,fill="#ee0b45",stroke="none")|repeat(6,rotate(60))|scale(0.55)
e5=ellipse(h=250,w=80,fill="#f4295d",stroke="none")|repeat(6,rotate(60))|scale(0.45)
flower=combine([e1,e2,e3,e4,e5])

#outtest circle
c11 = circle(r=145 , fill="#ee0b45", stroke="none")
c2 = rectangle(w=200, h=200, fill="#ffcd10", stroke="none") | repeat(9, rotate(angle=10))
c3 = rectangle(w=185, h=185, fill="#FFA500", stroke="none") | repeat(8, rotate(angle=30)) |  rotate(25)
c4 = rectangle(w=160, h=160, fill="#ee0b45", stroke="none") | repeat(8, rotate(angle=30)) | rotate(25)
c5 = circle(r=93 , fill="#FFA500" ,stroke="none") 
show(c11,c2,c3,c4,c5 )

#design
design = (owndes(0,50,"white") | scale(1.75) ) +  (owndes(0,50," yellow") | scale(1.5) | translate(x=4,y=40) )
show(design | repeat(9,rotate(60)) | rotate(30))

show(flower|scale(0.86))
design = owndes(0,50,"#d9138a") + (owndes(0,50,"#e2d810") | scale(0.75) | translate(x=3,y=20) ) +  (owndes(0,50," #ff6e40") | scale(0.5) | translate(x=4,y=40) )
show(design | repeat(9,rotate(60)) | rotate(30))

#middle circles
c1=circle(r=20,fill="#FFFFE0",stroke="none")
c2=circle(r=27.5,fill="#f7bf05",stroke="none")
c3=circle(r=35,fill="#FFA500",stroke="none")
show(c3,c2,c1)

#Tinkerhub
r1 = rectangle(w=17 ,h=7 ,fill ="#07bacc", x=-5,y=9 ,stroke="none")
r2 = rectangle(w=8 ,h=7 ,fill ="#0060ff", x=9,y=9 ,stroke="none")
r3 = rectangle(w=27 ,h=7 ,fill ="#ffcd10", x=0,y=0 ,stroke="none")
r4 = rectangle(w=12 ,h=7 ,fill ="#ee1700", x=-7,y=-9 ,stroke="none")
r5 = rectangle(w=4 ,h=7 ,fill ="#95bf15", x=3,y=-9 ,stroke="none")
r6 = rectangle(w=6 ,h=7 ,fill ="#205b67", x=10,y=-9 ,stroke="none")
show(r1,r2,r3,r4,r5,r6)