Code
#colors
col_xiketic = color(r=3,g=7,b=30)
col_rosewood = color(r=106,g=4,b=15)
col_darkred = color(r=157,g=2,b=8)
col_vermillion = color(r=220,g=47,b=2)
col_persimmon = color(r=232,g=93,b=4)
col_carrotorange = color(r=244,g=140,b=6)
col_selectiveyellow = color(r=255,g=186,b=8)
col_white = color(r=255,g=255,b=255)
col_mikadoyellow = color(r=255,g=215,b=13)
colors = [col_xiketic,col_white,col_selectiveyellow,col_carrotorange,col_persimmon,col_vermillion,col_darkred,col_rosewood,]
colors_outer = [col_xiketic,col_vermillion,col_persimmon,col_carrotorange,col_selectiveyellow,col_mikadoyellow]
colors_outer1 = [col_xiketic,col_vermillion,col_persimmon,col_carrotorange,col_selectiveyellow,col_white]
#pookkalam-shapes
#outer shady circles
rad = 150
for i in range(6):
col = colors_outer1[i]
outer_circle = circle(r=rad,fill=col,stroke="none")
show(outer_circle)
rad = rad-5
#lines in circles
angle=0
i=0
while i<92:
col = colors_outer[i%6]
elli = rectangle(w=169.9,h=169.9,fill=col,stroke="none") | rotate(angle)
show(elli)
angle = angle + 1
i+=1
#creating the square+circle shape
def sqr_cir(radius):
wd = 2*radius
ht = 2*radius
squy = rectangle(w=wd,h=ht,fill=col_carrotorange,stroke="none") | rotate(45)
squr = rectangle(w=wd,h=ht,fill=col_rosewood,stroke="none")
cir = circle(r=radius,fill=col_mikadoyellow ,stroke="none")
shape_sqc = combine([squy,squr,cir])
show(shape_sqc)
sqr_cir(84.9)
sqr_cir(60)
#points for the octagon
p1 = point(x=-25,y=50)
p2 = point(x=25,y=50)
p3 = point(x=50,y=25)
p4 = point(x=50,y=-25)
p5 = point(x=25,y=-50)
p6 = point(x=-25,y=-50)
p7 = point(x=-50,y=-25)
p8 = point(x=-50,y=25)
for i in range(8):
col = colors[i]
octagon = polygon([p1,p2,p3,p4,p5,p6,p7,p8],fill=col,stroke="none") | scale(x=0.87**i,y=0.87**i)
show(octagon)
#the circle
centre_circle = circle(r=10,fill="yellow",stroke="none")
show(centre_circle)