Code
s = rectangle(w=180, h=180,fill="black") | repeat(9, rotate(10))
s1 = rectangle(w=160,h=160,fill="red") | repeat(9, rotate(20))
s2 = rectangle(w=140,h=140,fill="orange") | repeat(9, rotate(30))
s3= rectangle(w=120,h=120,fill="yellow") | repeat(9, rotate(30))
s4 = circle(x=50, y=0, r=30,fill="blue",stroke="none") | repeat(8, rotate(45))
s5 = rectangle(w=100, h=100,fill="orange") | repeat(9, rotate(10))
show(s,s1,s2,s3,s4,s5)
def star(size):
p1 = point(x=-size/2, y=0)
p2 = point(x=0, y=2*size)
p3 = point(x=size/2, y=0)
p4 = point(x=0, y=-2*size)
shape1 = polygon([p1, p2, p3, p4], fill="indigo", stroke="none")
shape2 = shape1 | rotate(45)
shape3 = shape1 | rotate(90)
shape4 = shape1 | rotate(135)
return(shape1+shape2+shape3+shape4)
s = star(40)
c = circle(x=0,y=0,r=20,fill="#ff335b",stroke="none") +circle(x=0,y=0,r=10,fill="white",stroke="none")+circle(x=0,y=0,r=5,fill="#ff333f",stroke="none")
e = ellipse(x=0,y=40,w=10,h=20,fill="#ff333f",stroke="none") | repeat(8,rotate(45))
show(s,c,e)