Pookkalam by Nanda Kishor M Pai

Code

dark_green = fill = color(r=26, g=124, b=39)
dark_pink = color(r=233, g=36, b=89)
orange = color(r=255, g=153, b=51)
yellow = color(r=255, g=255, b=0)
white = fill1 = color(r=255, g=255, b=255)

outer_circle = circle(r=150, fill=dark_green, stroke="none")
show(outer_circle)

outer_petals = rectangle(w=212.5, h=212.5, fill=dark_pink,
                         stroke='none') | repeat(8, rotate(22.5))
show(outer_petals)

outer_donut_out = circle(r=5, x=125, fill=white, stroke="none")
outer_donut_in = circle(r=2, x=125, fill=dark_pink, stroke="none")
outer_donuts = combine([outer_donut_out, outer_donut_in]
                       ) | repeat(8, rotate(45))
show(outer_donuts)

mid_petals = rectangle(w=182, h=182, stroke='none',
                       fill=orange) | rotate(11.25) | repeat(8, rotate(22.5))
show(mid_petals)

inner_petals = rectangle(w=155, h=155, stroke='none',
                         fill=yellow) | repeat(8, rotate(22.5))
show(inner_petals)

inner_donut_out = circle(
    r=5, x=90, fill=dark_pink, stroke="none") | rotate(22.5)
inner_donut_in = circle(r=2, x=90, fill=yellow,
                        stroke="none") | rotate(22.5)
inner_donuts = combine([inner_donut_out, inner_donut_in]
                       ) | repeat(8, rotate(45))
show(inner_donuts)

p1 = point(x=104, y=7)
p2 = point(x=104, y=-7)
p3 = point(x=111, y=-12)
p4 = point(x=111, y=12)

inner_sqr_rot_cover = polygon([p1, p2, p3, p4], fill=dark_pink) | rotate(11.25)
vilaku_ellipse = ellipse(w=10, h=5, fill=white) | translate(
    x=117, y=0) | rotate(11.25)
vilaku = combine([inner_sqr_rot_cover, vilaku_ellipse]
                 ) | repeat(16, rotate(22.5))

show(vilaku)

sqr_rot_a = rectangle(w=110, h=110, x=0, y=0,
                      fill=dark_green)
sqr_rot_b = rectangle(w=110, h=110, x=0, y=0,
                      fill=dark_pink) | rotate(5.625)
sqr_rot = combine([sqr_rot_a, sqr_rot_b]) | repeat(32, rotate(11.25))
sqr_rot_face = rectangle(w=110, h=110, x=0, y=0,
                         fill=dark_green)
show(sqr_rot, sqr_rot_face)

inner_circle = circle(r=50, fill=dark_green, stroke=dark_pink, stroke_width=10)
show(inner_circle)
inner_sqr_rot_a = rectangle(w=35.36, h=35.36, x=18,
                            y=18, fill=orange, stroke='none')
inner_sqr_rot_b = rectangle(w=35.36, h=35.36, x=18, y=18,
                            fill=yellow, stroke='none') | rotate(45)

inner_sqr_rot = combine(
    [inner_sqr_rot_a, inner_sqr_rot_b]) | repeat(4, rotate(90))
show(inner_sqr_rot)

p1 = point(x=0, y=0)
p2 = point(x=35.36, y=35.36)
p3 = point(x=35.36, y=0)

inner_sqr_rot_cover = polygon([p1, p2, p3], fill=orange, stroke='none')
show(inner_sqr_rot_cover)

inner_most_poo = ellipse(
    w=6, h=3, x=5, y=0, fill=dark_pink) | repeat(8, rotate(45))
show(inner_most_poo)