Pookkalam by Dhananjay P S

Code

og1 = color(r=255, g=178, b=102)
yl1 = color(r=225, g=255, b=0,a = 1)
gr1 = color(r=70, g=225, b = 140)
bb1 = color(r=51, g=153, b = 255)
or1 = color(255,128,0, a=.7)

bgr = rectangle(w = 300, h = 300, fill = 'white')
ca = circle(r = 148, fill = og1) + circle(y = 0, r = 128, fill = yl1)
cb = circle(y = 137, r = 7, fill =bb1)|repeat(20, rotate(20)|scale(y = 1))
cc = circle(y = 137, r = 15, fill =gr1)|repeat(18, rotate(20)|scale(y = 1))
ra = rectangle(w = 85, h = 85, fill =color(255,0,127,a = .2))|repeat(8, rotate(20)|scale(x = 1))
ce = circle(r = 90,fill = "#FFFF66" , stroke = "#FF3333" ,stroke_width = 5)
rb = rectangle(y = 105, w = 40, h = 30, fill =color(255,153,153, a =.5))|repeat(25, rotate(20)|scale(x = 1))
ci = circle(r = 42, stroke = "#FFFF33", stroke_width = 2)

el = ellipse( x = 0, y = 72.5, w = 50,h = 17,fill = color(155,253,104, a = .5), stroke = color(255,51,51, a = .7), stroke_width = 3)|repeat(20, rotate(20))|scale(y = -1)
gewlc = circle(x = 12.5,y = 72.5,r = 5, fill = "#FFCC99")|repeat(20, rotate(20))|scale(y = -1)
flower = ellipse(w = 50, h = 75, stroke = "#FFFF99", stroke_width = 3)|repeat(5, rotate(360/5))
centc = circle(r = 5, fill = "#FF8000")

show(bgr,ca,cc,cb,ce,ra,rb,ci,el, gewlc,flower) 


    
def trie(a,b,c,d,e,f,n):
    p1 = point(a,b)
    p2 = point(c,d)
    p3 = point(e,f)
    tri = polygon([p1,p2,p3], fill = color(255,102,255, a = .7))|repeat(n, rotate(20))
    show(tri) 

trie(10,120,-10,120,0,95,25)   
trie(0,17,17,17,-17,-17,30)
show(centc)