Code
#background
bg = rectangle(w=305, h=305, fill="white")
show(bg)
#outermost circle
c = circle(r=150, fill='#341118')
show(c)
#gradient frame
def square(color, side):
return rectangle(w=side, h=side, fill=color, stroke='none')
white_layer = square(side=212.5,color='#FEFDF3') | repeat(10, rotate(10))
yellow_layer = square(side=196, color='#F8E63D') | rotate(5) | repeat(10, rotate(10))
dark_yellow_layer = square(side=182, color='#E3BD36') | repeat(10, rotate(10))
orange_layer = square(side=168, color='#F36636') | rotate(5) | repeat(10, rotate(10))
red_layer = square(side=155, color='#a92822') | repeat(10, rotate(10))
show(white_layer,yellow_layer, dark_yellow_layer, orange_layer,red_layer)
#double squre
s3 = rectangle(w=170, h=170, fill="green", stroke="none") | rotate(45)
s4 = rectangle(w=170, h=170, fill="green", stroke="none")
s5 = rectangle(w=160, h=160, fill="#F54E1C", stroke="none") | rotate(45)
s6 = rectangle(w=160, h=160, fill="#F54E1C", stroke="none")
show(s3,s4,s5,s6)
#flower petals
de = ellipse(w=210, h=50, fill="white", stroke="none") | repeat(4, rotate(45))
de1 = ellipse(w=200, h=50, fill="blue", stroke="none") | repeat(4, rotate(45))
de2 = ellipse(w=190, h=50, fill="yellow", stroke="none") | repeat(4, rotate(45))
show(de,de1,de2)
r2 = circle(r=83, fill="#ff0000")
s1 = rectangle(x=76, y=0, w=6, h=12, fill="violet", stroke="orange", stroke_width=2) | repeat(22, rotate(16.28))
r1 = circle(r=69, fill="yellow", stroke="white")
show(r2,r1)
s = rectangle(x=63, y=0, w=7, h=13, fill="red", stroke="none") | repeat(22, rotate(16.28))
show(s,s1)
e = ellipse(x=0, y=-104, w=65, h=30, fill="#ffffff", stroke="none")
e1 = ellipse(x=0, y=-90, w=120, h=50, fill="#ffffff", stroke="none")
e2 = ellipse(x=0, y=-90, w=97, h=46, fill="#ffffff", stroke="grey", stroke_width=0.3)
show(e1,e,e2)
k = circle(x=0, y=-75, r=38, fill="#5DD805", stroke="none")
k1 = circle(x=-15, y=-80, r=24, fill="#5DD805", stroke="none")
k2 = k1 | scale(x=-1)
show(k,k1,k2)
c1 = circle(r=42, fill="grey")
show(c1)
d1 = circle(x=-33, y=25, r=13, fill="orange", stroke="none")
d2 = d1 | scale(x=-1)
d3 = d1 | scale(y=-1)
d4 = d1 | scale(x=-1, y=-1)
show(d1, d2, d3, d4)
c2 = circle(r=45, stroke="black", stroke_width=5)
c3 = circle(r=48, stroke="white", stroke_width=3)
c4 = circle(r=54, stroke="#5DD805", stroke_width=8)
dcir = circle(x=54, y=0, r=2, fill="#E53350", stroke="none") | repeat(25, rotate(15))
show(c2,c3,c4,dcir)
p1 = point(x=0, y=0)
p2 = point(x=40, y=-50)
p3 = point(x=-40, y=-50)
po1 = polygon([p1,p2,p3], fill="red", stroke="none")
show(po1)
p1 = point(x=-5, y=80)
p2 = point(x=5, y=80)
p3 = point(x=17, y=10)
p4 = point(x=-17, y=10)
tri = polygon([p1,p2,p3,p4], fill="red")
show(tri)
dropc = circle(x=0, y=45, r=5, fill="white", stroke="none")
p1 = point(x=0, y=70)
p2 = point(x=5, y=45)
p3 = point(x=-5, y=45)
dropt = polygon([p1,p2,p3], fill="white", stroke="none")
show(dropc,dropt)
c5 = circle(x=0, y=-5,r=30,fill="#a92822", stroke="none")
show(c5)
r3 = rectangle(x=0, y=-22, w=60, h=30, fill="orange", stroke="none")
r4 = rectangle(x=0, y=-13, w=60, h=13, fill="#a92822", stroke="none")
c6 = circle(x=0, y=-13, r=4.5, fill="yellow", stroke="none")
c7 = c6 | translate(x=12)
c8 = c6 | translate(x=24)
c9 = c6 | translate(x=-12)
c10 = c6 | translate(x=-24)
show(r3,r4,c6,c7,c8,c9,c10)
p1 = point(x=4, y=-25)
p2 = point(x=0, y=-22)
p3 = point(x=-4, y=-25)
p4 = point(x=0, y=-29)
pent = polygon([p1,p2,p3,p4], fill="yellow", stroke="none")
pe1 = pent | repeat(5, translate(x=6.3))
pe2 = pe1 | scale(x=-1)
show(pent,pe1,pe2)
yl = rectangle(x=0, y=30, w=28, h=3, fill="yellow", stroke="none")
show(yl)
m = circle(x=0, y=25, r=4.5, fill="orange", stroke="none") + circle(x=0, y=25, r=2.5, fill="white", stroke="none")
m1 = m | translate(x=10, y=-1.5)
m2 = m | translate(x=-10, y=-1.5)
show(m,m1,m2)
e3 = ellipse(x=0, y=-100, w=25, h=5, fill="red", stroke="none")
show(e3)
p = circle(x=-12, y=-100, r=3, fill="red", stroke="none")
po = p | scale(x = -1)
show(p,po)
wr = rectangle(x=0, y=0, w=54, h=10, fill="white", stroke="none")
show(wr)
gc = circle(x=-25, y=0, r=5, fill="white", stroke="none")
gc1 = gc | scale(x=-1)
show(gc,gc1)
canw = rectangle(x=0, y=-3, w=60, h=4, fill="#ffffff", stroke="none")
p1 = point(x=0, y=0)
p2 = point(x=3, y=-5)
p3 = point(x=-3, y=-5)
trig = polygon([p1,p2,p3], fill="green", stroke="none")
trig1 = trig | repeat(6, translate(x=5.5))
trig2 = trig1 | scale(x=-1)
show(canw,trig,trig1,trig2)
cut = ellipse(x=17, y=-50, w=29, h=8, fill="#5DD805", stroke="none")
cut2 = cut | scale(x=-1)
show(cut,cut2)
eye = ellipse(x=17, y=-65, w=20, h=6, fill="white") + circle(x=17, y=-65, r=2.5, fill="black") + ellipse(x=17, y=-63, w=20, h=8, stroke_width=3) + circle(x=17, y=-63.5, r=0.4, fill="#999999", stroke="none")
leye = eye | scale(x=-1)
show(eye,leye)
p1 = point(x=-6, y=-64)
p2 = point(x=-12, y=-70)
p3 = point(x=-17, y=-72)
p4 = point(x=-22, y=-71)
p5 = point(x=-27, y=-70)
p6 = point(x=-32, y=-67)
p7 = point(x=-33, y=-65)
p8 = point(x=-34, y=-58)
p9 = point(x=-27, y=-65)
p10 = point(x=-22, y=-67)
p11 = point(x=-17, y=-68)
p12 = point(x=-12, y=-67)
bro = polygon([p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12], fill="black")
bro2 = bro | scale(x=-1)
show(bro,bro2)
p1 = point(x=-2, y=-66)
p11 = point(x=-9, y=-58)
p2 = point(x=-20, y=-51)
p3 = point(x=-27, y=-54)
p4 = point(x=-30, y=-54)
p5 = point(x=-37, y=-51)
p7 = point(x=-28, y=-50)
p8 = point(x=-22, y=-48)
p9 = point(x=-17, y=-48)
p10 = point(x=-6, y=-56)
top = polygon([p1,p11,p2,p3,p4,p5,p7,p8,p9,p10], fill="black")
topr = top | scale(x=-1)
show(top,topr)
b = circle(x=-43, y=-55, r=15, fill="white", stroke="black") + circle(x=-43, y=-55, r=13, fill="white", stroke="black") + circle(x=-43, y=-55, r=11, fill="white", stroke="black") + circle(x=-43, y=-55, r=9, fill="white", stroke="black") + circle(x=-43, y=-55, r=7, fill="white", stroke="black") + circle(x=-43, y=-55, r=5, fill="black", stroke="black")
b1 = b | scale(x=-1)
show(b,b1)
col = color(r=119, g=235, b=13, a=0.4)
p1 = point(x=-2, y=-70)
p2 = point(x=-5, y=-85)
p3 = point(x=-9, y=-88)
p33 = point(x=-10, y=-90)
p4 = point(x=-7, y=-92)
p5 = point(x=1, y=-91)
p6 = point(x=8, y=-92)
p66 = point(x=10, y=-91)
p7 = point(x=9, y=-88)
p8 = point(x=6, y=-85)
pl = point(x=4, y=-70)
nose = polygon([p1,p2,p3,p33,p4,p5,p6,p66,p7,p8,pl], fill="#60C706", stroke=col)
show(nose)
canc = rectangle(x=1, y=-69, w=5.5, h=3, fill="#5DD805", stroke="none")
show(canc)
rline = rectangle(x=0, y=-34, w=60, h=2, fill="#ff0000", stroke="none")
gline = rectangle(x=0, y=2, w=59, h=1, fill="green", stroke="none")
lline = rectangle(x=0, y=-100, w=25, h=0.3, fill="#555555", stroke="none")
show(rline,gline,lline)
p1 = point(x=0, y=-50)
p2 = point(x=0, y=-58)
p3 = point(x=-12, y=-50)
p4 = point(x=-12, y=-46.5)
p5 = point(x=-7, y=-47)
fh = polygon([p1,p2,p3,p4,p5], fill="yellow", stroke="none")
fh1 = fh | scale(x=-1)
show(fh,fh1)
fhc = circle(x=0, y=-56.5, r=1, fill="#000000", stroke="none")
p1 = point(x=1, y=-56.5)
p2 = point(x=-1, y=-56.5)
p3 = point(x=0, y=-52)
fht = polygon([p1,p2,p3], fill="#000000", stroke="none")
fhr = rectangle(x=0, y=-57.5, w=5, h=0.5, fill="#ff0000", stroke="none")
fhd = circle(x=0, y=-60, r=0.9, fill="#ff0000", stroke="none")
show(fhc,fhr,fht,fhd)
p1 = point(x=1, y=1)
p2 = point(x=-1, y=1)
p3 = point(x=0, y=4.5)
star = polygon([p1,p2,p3], fill="yellow", stroke="none") | repeat(14, rotate(25))
star1 = star | translate(y=11)
star2 = star | translate(x=13, y=11)
star3 = star | translate(x=-13, y=11)
show(star1,star2,star3)