Code
# background and outer circle
bg = rectangle(w=400, h=400, fill="#efcbf5")
border_circle = circle(r=150, stroke="green", stroke_width=15)
# box colors
def boxesColors(color_list):
shapes = []
w=20
h=25
x=140
for i in color_list:
shape = rectangle(x=x, y=0, w=w, h=h ,stroke="none", fill=i)
x = x * 0.85
w = w * 0.89
h = h * 0.89
shapes.append(shape)
return combine(shapes)
color_list1 = ["#322634", "#ebf3f5", "#dfe6a0", "#e7ca04", "#f99100", "#9a231d"]
color_list2 = ["#ebf3f5", "#dfe6a0", "#e7ca04", "#f99100", "#9a231d", "#322634"]
color_list3 = ["#dfe6a0", "#e7ca04", "#f99100", "#9a231d", "#322634", "#ebf3f5"]
color_list4 = ["#e7ca04", "#f99100", "#9a231d", "#322634", "#ebf3f5", "#dfe6a0"]
color_list5 = ["#f99100", "#9a231d", "#322634", "#ebf3f5", "#dfe6a0", "#e7ca04"]
color_list6 = ["#9a231d", "#322634", "#ebf3f5", "#dfe6a0", "#e7ca04", "#f99100"]
layer1 = boxesColors(color_list1)
layer2 = boxesColors(color_list2)
layer3 = boxesColors(color_list3)
layer4 = boxesColors(color_list4)
layer5 = boxesColors(color_list5)
layer6 = boxesColors(color_list6)
s1 = layer1
s2 = layer2 | rotate(10)
s3 = layer3 | rotate(20)
s4 = layer4 | rotate(30)
s5 = layer5 | rotate(40)
s6 = layer6 | rotate(50)
final = combine([s1, s2, s3, s4, s5, s6])
final = final | repeat(6, rotate(60))
# circle center
center = circle(r=56,fill="#e540ff", stroke="#891d9a", stroke_width=5)
p1 = point(x=125, y=7.5)
p2 = point(x=150, y=0)
p3 = point(x=125, y=-7.5)
p4= point(x=0, y=0)
arrow= polygon([p1,p2,p3,p4], fill="#e7ca04", stroke='none')
arrow = arrow | scale(0.36)
s2 = arrow | repeat(6, rotate(60))
#c11 = rectangle(w=70, h=70, fill="green", stroke="none") | repeat(9, rotate(angle=10))
c12 = rectangle(w=60, h=60, fill="#f99100", stroke="none") | repeat(9, rotate(angle=10))
c13 = rectangle(w=50, h=50, fill="#9a231d", stroke="none") | repeat(9, rotate(angle=10))
c14 = rectangle(w=40, h=40, fill="#322634", stroke="none") | repeat(9, rotate(angle=10))
# center_sqr = combine([c11, c12, c13, c14])
center_sqr = combine([c12, c13, c14])
# Maglish logo
bgma = rectangle(w=260, h=260, fill="#292b2c")
color_gray = "#444445"
color_green = "#6fc275"
def ma(colr, sclx, scly):
c = ellipse(w=190, h=150,y=65, fill=colr, stroke="none") | translate(x=0, y=-17)
# s= rectangle(w=200, h=150, fill=color_gray, stroke="none")
p1 = point(x=94.4, y=62)
p2 = point(x=-94.4, y=62)
p3 = point(x=100, y=-100)
p4 = point(x=-100, y=-100)
shape = polygon([p1, p2, p4, p3],fill=colr, stroke="none")
maglish = c+shape
bb = maglish | scale(y=scly, x=sclx)
return bb
# bb = maglish | scale(y=0.9, x=1)
l = ma(color_gray, 1, 0.9)
def green_ma():
# greeen ma
c = ellipse(w=200, h=150,y=65, fill=color_green, stroke="none")
c = c | scale(x=0.75, y=0.75) | translate(x=0, y=-17)
p1 = point(x=94.1, y=59)
p2 = point(x=-94.1, y=59)
p3 = point(x=100, y=-90)
p4 = point(x=-100, y=-90)
shape = polygon([p1, p2, p4, p3],fill=color_green, stroke="none")
shape = shape | scale(x=0.785, y=0.728)
mo = c+ shape
return mo
mo = green_ma()
last = bgma + l + mo
def gray_cut():
c = ellipse(w=55, h=50,y=0, x=0, fill=color_gray, stroke="none")
c = c | rotate(75)
p1 = point(x=50, y=50)
p2 = point(x=-15.5, y=21) # now here
p3 = point(x=18.1, y=-18.1)
shape = polygon([p1, p2, p3],fill=color_gray, stroke="none")
m = c + shape
m = m | rotate(210)| scale(x=2.3, y=1.9) | translate(x=-10, y=39)
return m
cut = rectangle(w=50, h=135, x=-60, y=-5, fill=color_gray, stroke="none")
# green cut
def green_cut():
c = ellipse(w=55, h=50,y=0, x=0, fill=color_green, stroke="none")
c = c | rotate(75)
p1 = point(x=50, y=50)
p2 = point(x=-15.5, y=21) # now here
p3 = point(x=18.1, y=-18.1)
shape = polygon([p1, p2, p3],fill=color_green, stroke="none")
m1 = c + shape
m1 = m1 | rotate(203)| scale(x=1.7, y=1.5) | translate(x=-20, y=39)
return m1
hu = gray_cut()
he = green_cut()
logo = combine([last,hu,cut,he])
logo = logo | scale(0.15)
# oil lamp
ball = ellipse(w=90, h=50, fill="#ff7700", stroke="#ffe600", stroke_width=8)
light = ellipse(x=45, y=0, w=40, h=20, fill="#ffee00", stroke="#fff563", stroke_width=4)
lamp = combine([ball, light])
lamp = lamp |translate(x=480, y=0) | repeat(4, rotate(angle=90))
lamp = lamp | rotate(45) | scale(0.35)
#center circles
circle1 = circle(x=50, y=0, r=55, fill="#9b21ff")
circle2 = circle(x=50, y=0, r=45, fill="#6407b0")
circle3 = circle(x=50, y=0, r=35, fill="#3d0869")
circles = combine([circle1, circle2, circle3])
circles = circles | repeat(15, rotate(60))
circles = circles | scale(0.5)
# final Pookkalam
il = combine([center,circles, center_sqr, s2, logo])
il = il | scale(1.35)
pookkalam = combine([bg, border_circle ,lamp ,final, il])
pookkalam = pookkalam | scale(0.95)
show(pookkalam)