Code
import math
c1 = circle(r=150,fill="#005204", stroke="none")
c2 = circle(x=80, y=0, r=62,fill="#d10a00", stroke="none")|repeat(8,rotate(45))
c3 = circle(x=80, y=0, r=50.5,fill="orange", stroke="none")|repeat(8,rotate(45))
c4 = circle(x=80, y=0, r=40,fill="yellow", stroke="none")|repeat(8,rotate(45))
c5 = circle(x=80, y=0, r=30,fill="#fffede", stroke="none")|repeat(8,rotate(45))
c6 = circle(r=100,fill="#005204", stroke="none")
c7 = circle(r=95,fill="#f7f263", stroke="none")
show(c1,c2,c3,c4,c5,c6,c7)
def sq(f, s):
return rectangle(w=s, h=s, fill=f, stroke='none')
sq1 = sq(s=135,f='#F8E63D') | repeat(10, rotate(10))
sq2 = sq(s=130, f='#E3BD36') | rotate(5) | repeat(10, rotate(10))
sq3 = sq(s=120, f='#c94700') | repeat(10, rotate(10))
sq4 = sq(s=18, f='red') | repeat(8, rotate(22.5))|translate(x=37, y=40)
show(sq1,sq2, sq3)
c8 = circle(r=76,fill="#dee1ff", stroke="none")
show(c8)
s1 = ellipse(w=65, h=158,fill="#d10f00", stroke="none")|repeat(4,rotate(45))
s2 = ellipse(x=-20,y=8,w=45, h=108,fill="black", stroke="none")|rotate(90)
show(s2)
r2 = rectangle(x=30,y=-21,w=64, h=44, fill="black", stroke="none")
show(r2)
s4 = ellipse(x=-55,y=-8,w=26, h=38,fill="black", stroke="none")|rotate(0)
show(s4)
s3 = ellipse(x=-15,y=-8,w=45, h=118,fill="#dee1ff", stroke="none")|rotate(90)
show(s3)
r3 = rectangle(x=34,y=-15,w=64, h=44, fill="#dee1ff", stroke="none")|rotate(-3)
show(r3)
c9 = circle(x=-16,y=-7,r=5,fill="black", stroke="none")
show(c9)
c10 = circle(x=8,y=-9,r=5,fill="black", stroke="none")
show(c10)
c11 = circle(x=30,y=-10,r=5,fill="black", stroke="none")
show(c11)
s5 = ellipse(x=-16,y=-26,w=7, h=24,fill="black", stroke="none")
show(s5)
s6 = ellipse(x=8,y=-28,w=7, h=24,fill="black", stroke="none")
show(s6)
s8 = ellipse(x=30,y=-29,w=7, h=24,fill="black", stroke="none")
show(s8)
r4 = rectangle(x=-40,y=19,w=24, h=44, fill="#dee1ff", stroke="none")|rotate(23)
show(r4)
r5 = rectangle(x=-22,y=-36,w=4, h=44, fill="black", stroke="none")|rotate(23)
show(r5)
r6 = rectangle(x=0,y=-45,w=4, h=44, fill="black", stroke="none")|rotate(23)
show(r6)
r7 = rectangle(x=20,y=-50,w=4, h=44, fill="black", stroke="none")|rotate(23)
show(r7)
show(sq4)
n=0
s9 = ellipse(w=5, h=20,fill="#ffdd00", stroke="none")|repeat(4,rotate(45))|translate(x=53, y=129)
c12 = circle(r=4.5,fill="#750202", stroke="none")|translate(x=53, y=129)
for i in range(8):
s1 = s9 | rotate(n)
show(s1)
c13 = c12|rotate(n)
show(c13)
n = n + 45
def path(d, stroke, stroke_width, fill="none"):
return Shape("path", d=d, stroke_width=stroke_width, fill=fill, stroke=stroke)
def arc(angle,stroke,stroke_width, **kwargs):
x = 100 * math.cos(math.radians(angle))
y = 100 * math.sin(math.radians(angle))
long_flag = int(angle > 180)
d = f"M 100 0 A 100 100 0 {long_flag} 1 {x} {y}"
return path(d,stroke, stroke_width, **kwargs)
shape1 = arc(45,"#750202",9)|rotate(110)|translate(x=19, y=-30)
show(shape1)
shape2 = arc(45,"#dee1ff",6)|rotate(105)|translate(x=29, y=-29)
show(shape2)
shape3 = arc(20,"green",3)|rotate(4)|translate(x=-109, y=26)
shape4 = arc(20,"green",3)|rotate(4)|translate(x=-135, y=5)
show(shape3,shape4)
shape6 = arc(9,"green",1)|rotate(-200)|translate(x=77, y=27)
shape7 = arc(10,"green",1)|rotate(-200)|translate(x=81, y=13)
shape8 = arc(10,"green",1)|rotate(-200)|translate(x=51, y=8)
shape9 = arc(10,"green",1)|rotate(-200)|translate(x=55, y=-6)
shape10 = arc(10,"green",1)|rotate(-200)|translate(x=79, y=20)
shape11 = arc(10,"green",1)|rotate(-200)|translate(x=53, y=1)
show(shape6,shape7,shape8,shape9,shape10,shape11)