Code
#Pookalam
r = rectangle(x=0, y=0, w=300, h=300, fill="#f9faf9",stroke="black", stroke_width="5")
show(r)
#functions
def greencircle():
c = circle(r = 128, fill="green", stroke="none")
return c
def innercircle():
c = circle(r=10, fill="maroon", stroke="yellow")
return(c)
def elliptical1():
e = ellipse(w=200, h=100, fill="#fb8223",stroke="yellow",stroke_width="2") | repeat(30, rotate(30))
return(e)
def medcircle():
c = circle(r=105, fill="#f71502",stroke="none")
return(c)
def medcircle2():
c = circle(r = 115, fill="#f27c13", stroke="none", stroke_width="0.1")
return c
def medcircle3():
c = circle(r = 125, fill="#fad415", stroke="maroon", stroke_width="1")
return c
def redcircle():
c = circle(r=90, fill="#fafe8c", stroke="green", stroke_width="3")
return(c)
def curvedline():
l = line(0, 5, 10, 25, stroke="yellow", stroke_width="2") | repeat(30, rotate(15))
return l
def smallc():
c = circle(r=25, stroke="white", stroke_width="4")
return c
def bgcircle():
c = circle(r=25, fill="#fc3a0f")
return c
def yelring():
e = ellipse(x=0,y=25,w=25,h=50,fill="#de056b", stroke="white", stroke_width="2") | repeat(8, rotate(45))
return e
def magic():
sq =rectangle(w = 80, h=80, fill="red", stroke="yellow", stroke_width="1") | repeat(100, rotate(5))
return sq
def triangle():
p1 = point(0, 60)
p2 = point(25, 75)
p3 = point(-25, 75)
t = polygon([p1, p2, p3, p1], fill="maroon", stroke="none") | repeat(8, rotate(45))
return t
def smalltri():
p1 = point(0, 63)
p2 = point(15, 72.5)
p3 = point(-15, 72.5)
t = polygon([p1, p2, p3, p1], fill="#de056b", stroke="none") | repeat(8, rotate(45))
return t
def vsmall():
c = circle(x=0, y=110, r=7, fill="maroon", stroke="none") | repeat(12, rotate(45))
return c
s = (greencircle() + medcircle3() + medcircle2() + medcircle() + elliptical1() + redcircle() + \
magic() + yelring() + bgcircle() + curvedline() + innercircle() + smallc() + triangle() + \
smalltri() + vsmall())
show(s)