Code
#arrow head
p1 = point(x=125, y=0)
p2 = point(x=100, y=-15)
p3 = point(x=100, y=15)
triangle = polygon([p1, p2, p3],fill="#660000 ",stroke="none")|translate(x=50)
triangle1 = polygon([p1, p2, p3],fill=" #00FF33 ",stroke="none")|scale(0.5)|translate(x=100)
rec = rectangle(x=75,y=0,w=50,h=10,fill="#660000 ",stroke="none")|translate(x=50)
rec2 = rectangle(x=75,y=0,w=50,h=5,fill="white",stroke="none")|translate(x=50)
cir=circle(x=125,y=0,r=5,fill="green")|translate(x=50)
cir2=circle(x=125,y=0,r=3,fill="white")|translate(x=50)
ele1=ellipse(x=125,w=20,h=10,fill="blue")|translate(x=50)
arrow=combine([ele1,triangle,rec,triangle1,rec2,cir,cir2])|scale(0.8)|repeat(16, rotate(22.5))
#the rest of the pattern
c1 = circle(r=150,fill="#FF3366 ",stroke="#33FF00",stroke_width=5)
r3=rectangle(w=250,h=250,fill="#FFFF00 ")
r4=rectangle(w=240,h=240,fill="#FFCC00")
r5=rectangle(w=230,h=230,fill="#FF9900")
r6=rectangle(w=220,h=220,fill="#FF6600 ")
r7=rectangle(w=200,h=266,fill="#3333FF ")
r8=rectangle(w=266,h=200,fill="#3333FF ")
e1=ellipse(x=100,y=43,w=50,h=55,fill="yellow",stroke=" #660000 ",stroke_width="4")|repeat(9,rotate(45))
fill = color(r=0, g=0, b=0, a=0.5)
r1=rectangle(x=0,y=0,w=210,h=210,fill=fill)|repeat(10,rotate(45))#fill color
r2=rectangle(x=0,y=0,w=205,h=206,fill="#00FFFF ",stroke="white",stroke_width=4)|repeat(15,rotate(15))
c3=circle(r=100,fill="white")
c4=circle(x=95,y=0,r=5,fill="#6600FF ",stroke="1")|repeat(36,rotate(10))
c5=circle(r=92,fill="#66FF00")
#small flower
def dot(x,y):
c7=circle(x=x+0,y=y+0,r=3,fill="#660000 ",stroke="1")
c2=circle(x=x+0,y=y+0,r=6,fill="yellow",stroke="1")
e2=ellipse(x=10,y=0,w=15,h=5,fill="red",stroke="1")|repeat(20, rotate(20))|translate(x=x,y=y)
e3=e2+c2+c7
return e3
d=dot(x=120,y=0)|repeat(10,rotate(45))
e3=ellipse(x=50,y=0,w=90,h=20,fill="#FFFF99 ",stroke="white",stroke_width=3)|repeat(20, rotate(20))
e4=ellipse(x=50,y=0,w=80,h=16,fill="#FFFF00 ",stroke="none")|repeat(20, rotate(20))
e5=ellipse(x=50,y=0,w=70,h=12,fill="#FF6600",stroke="none")|repeat(20, rotate(20))
e6=ellipse(x=50,y=0,w=60,h=8,fill="#FF0000 ",stroke="none")|repeat(20, rotate(20))
e7=ellipse(x=50,y=0,w=50,h=4,fill="#990033",stroke="none")|repeat(20, rotate(20))
e8=ellipse(x=50,y=0,w=40,h=2,fill="black",stroke="#660000",stroke_width=2)|repeat(20, rotate(20))
c6=circle(x=0,y=0,r=20,fill="yellow",stroke="1")
shape=combine([r7,r8,r3,r4,r5,r6,c1,r2,e1,arrow,r1,d,c3,c4,c5,e3,e4,e5,e6,e7,e8,c6,])
show(shape)
#code for the head
#the whole crown(backside)
fill=color(r=250,g=0,b=0,a=0.9)
c = circle(x=0,y=70,r=80,fill=fill) | repeat(10, scale(0.9))
s = circle(x=0, y=72, r=5,fill="white") | repeat(36, rotate(10))|translate(x=0,y=71)
s4 = circle(x=0, y=72, r=2,fill="yellow") | repeat(36, rotate(10))|translate(x=0,y=71)
s1 = circle(x=0, y=37, r=3,fill="white") | repeat(36, rotate(10))|translate(x=0,y=5)
s3 = circle(x=0, y=37, r=1,fill="yellow") | repeat(36, rotate(10))|translate(x=0,y=5)
#crown front side
r1=ellipse(x=0,y=100,w=13,h=20,fill=" #f4d03f")
r2=circle(x=0,y=85,r=10,fill="#f7dc6f ")
r3=ellipse(x=0,y=50,w=50,h=65,fill=" #e59866 ")
r4=ellipse(x=0,y=50,w=55,h=35,fill=" #f1c40f")
r5=circle(x=0,y=30,r=29,fill=" #d35400")
r6=ellipse(x=0,y=25,w=5,h=15,fill="red")
#face
c1=circle(x=-16,y=16,r=15,fill="green",stroke="none")
c2=circle(x=16,y=16,r=15,fill="green",stroke="none")
c3=circle(x=0,y=0,r=27,fill="green",stroke="none")
e1=ellipse(x=0,y=-15,w=70,h=45,fill="green",stroke="none")
e2=ellipse(x=0,y=-30,w=25,h=30,fill="green",stroke="none")
e3=ellipse(x=0,y=-30,w=35,h=40,fill="white",stroke="none")
e4=ellipse(x=0,y=-15,w=90,h=40,fill="white",stroke="none")
e5=ellipse(x=0,y=20,w=5,h=10,fill="#ffee58 ")
#lips
lips=ellipse(x=0,y=-26,w=20,h=5,fill="red",stroke="none")+circle(x=14,y=-26,r=5,fill="red",stroke="none")+circle(x=-14,y=-26,r=5,fill="red",stroke="none")+ line(x1=-13, y1=-26, x2=13, y2=-26)
#nose
p1 = point(x=0, y=0)
p2 = point(x=-10, y=-17)
p3 = point(x=10, y=-17)
nose = polygon([p1, p2, p3],fill="#229954",stroke="none")+circle(x=-7,y=-16,r=5,fill="#229954",stroke="none")+circle(x=7,y=-16,r=5,fill="#229954",stroke="none")
#eyes
eye1=ellipse(x=15,y=5,w=20,h=10,fill="black")+ellipse(x=15,y=5,w=20,h=7,fill="white")+circle(x=15,y=5,r=3,fill="black")
eyebr1=ellipse(x=20,y=3,w=30,h=24,fill="black")
eyebro1=eyebr1|rotate(30)
eye2=ellipse(x=-15,y=5,w=20,h=10,fill="black")+ellipse(x=-15,y=5,w=20,h=7,fill="white")+circle(x=-15,y=5,r=3,fill="black")
eyebr2=ellipse(x=-20,y=3,w=30,h=24,fill="black")
eyebro2=eyebr2|rotate(-30)
#earring small
def dot(x, y):
p=circle(x=x,y=y,r=3,fill="#85c1e9",stroke="#27ae60",stroke_width=2)
p1 = circle(x=x,y=y,r=8,fill="red")
p2=circle(x=x,y=y,r=16,fill="yellow",stroke="#27ae60")
p3=circle(x=12, y=0, r=2,fill="red") | repeat(8, rotate(45))|translate(x=x,y=y)
p4=p2+p1+p+p3
return p4
d1=dot(x=43,y=10)
d2=dot(x=-43,y=10)
#ear ring large
def dot2(x, y):
p=circle(x=x,y=y,r=5,fill="#85c1e9",stroke="#27ae60",stroke_width=3)
p1 = circle(x=x,y=y,r=15,fill="red")
p2=circle(x=x,y=y,r=25,fill="yellow",stroke="#27ae60",stroke_width=4)
p3=ellipse(x=17, y=0, w=12,h=5,fill="red") | repeat(8, rotate(45))|translate(x=x,y=y)
p4=p2+p1+p+p3
return p4
d3=dot2(x=42,y=-18)
d4=dot2(x=-42,y=-18)
head=combine([c,s,r1,r2,r3,r4,r5,s1,s3,s4,r6,d3,d4,c1,c2,c3,e4,e3,e1,e2,e5,lips,nose,eyebro1,eyebro2,eye1,eye2,d1,d2])|translate(x=0,y=-47) |scale(0.88)
show(head)