Code
def crown():
p1 = point(x=-50 , y=0)
p2 = point(x=-55 , y=20)
p3 = point(x=-45 , y= 15)
p4 = point(x=-40 , y= 30)
p5 = point(x=-30 , y= 20)
p6 = point(x=-0 , y= 40)
p7 = point(x=30 , y= 20)
p8 = point(x=40 , y= 30)
p9 = point(x=+45 , y= 15)
p10 = point(x=+55 , y=20)
p11 = point(x=+50 , y=0)
c1= circle(x=-55 , y=20,r=2,fill="black",stroke='#F98404')
c2= circle(x=-40 , y= 30,r=3,fill="black",stroke='#F98404')
c3= circle(x=-0 , y= 40,r=5,fill="black",stroke='#F98404')
c4= circle(x=40 , y= 30,r=3,fill="black",stroke='#F98404')
c5= circle(x=+55 , y=20,r=2,fill="black",stroke='#F98404')
c =c1+c2+c3+c4+c5
shape = polygon([p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11],fill = "#FB3640",stroke="#FDCA40")
crown =(shape +c)|translate(y=70)
pattern = crown|repeat(5,rotate(72))
return pattern
e = ellipse(h=65,fill="yellow",stroke="black",stroke_width=.3)
shape1 = e|repeat(6,rotate(30))|scale(1.3)
s = ellipse(x=100, y=0, w=25, h=25,fill="#fff200",stroke="none")
# s = circle(x=140, y=0, r=10) try it with rectangle ...
s1 = s | repeat(20, scale(0.85))
s2 = s1 | repeat(36, rotate(10))
s = ellipse(x=100, y=0, w=10, h=25,fill="#ff9f1a",stroke="none")
s3 = s | repeat(20, scale(0.85))
s4 = s3 | repeat(36, rotate(10))
shape3 = s2 +s4
c = circle(r=20,y=20,fill="")
a = c|repeat(10,rotate(40))|scale(.25)|translate(x=57)
b = (a|repeat(6,rotate(60))|rotate(30))
back = rectangle(w=300,h=300,fill = "black")
e2 = ellipse(w=137,h=35,fill="red",stroke="none",stroke_width=2)
shape2 = e2|repeat(3,rotate(120))
o_y = ellipse(w=90 ,h=35,fill="yellow",stroke="#FDCA40")
ell_o_y = o_y|repeat(3,rotate(120))|rotate(90)
c1 = circle(r=15,fill = "yellow",stroke="none")
c2 = circle(r=30,fill="red",stroke="none")
c3 = circle(r=45,fill="#ffaf40",stroke="#4b4b4b")
# orange
shape4 = circle( r=15, fill="#ff4d4d",stroke="black") | repeat(297, rotate(16)|scale(.92922) )
c4 = circle(r=70,fill="#cd84f1",stroke="black",stroke_width=4)
def square(color, side):
return rectangle(w=side, h=side, fill=color, stroke='none')
green = square(side=212.5,color='#96BB7C')
green_layer = green | repeat(10, rotate(10))
yellow_sqr = square(side=198, color='#F8E63D') | rotate(5)
yellow_layer = yellow_sqr | repeat(10, rotate(10))
dark_yellow_sqr = square(side=182, color='#E3BD36')
dark_yellow_layer = dark_yellow_sqr | repeat(10, rotate(10))
orange_sqr = square(side=168, color='#F36636') | rotate(5)
orange_layer = orange_sqr | repeat(10, rotate(10))
red_sqr = square(side=155, color='#a92822')
red_layer = red_sqr | repeat(10, rotate(10))
# show(white_layer,yellow_layer, dark_yellow_layer, orange_layer,red_layer)
c = circle(r=10,fill ="black",stroke = "none" )|translate(x = 60)
shape5 = c|repeat(400, rotate(6)|scale(.99))
show(back,shape5,green_layer,yellow_layer, dark_yellow_layer, orange_layer,red_layer,shape3,c4,b,shape2,c3,ell_o_y,c2,c1,shape4,crown())