Code
#outter layer
c1= circle(r=150, fill="black")
r1 = rectangle (w=210,h=210,fill="brown", stroke="brown") | repeat (15,rotate(50))
r2 = rectangle (w=195,h=195,fill="red", stroke="red")|rotate(15) | repeat (15,rotate(50))
r3 = rectangle (w=179,h=179,fill="orange", stroke="orange")|rotate(0) | repeat (15,rotate(50))
r4 = rectangle (w=162,h=162,fill="yellow", stroke="yellow")|rotate(15) | repeat (15,rotate(50))
r5 = rectangle (w=144,h=144,fill="white", stroke="white")|rotate(0) | repeat (15,rotate(50))
show(c1,r1,r2,r3,r4,r5)
#middle layer
m1 = rectangle (w=135,h=135,fill="white", stroke="gold")|rotate(0) | repeat (3,rotate(120))
m2 = rectangle(w=125,h=125,fill="#ba1b09", stroke="#ba1b09")|rotate(0) | repeat (3,rotate(120))
m3 = rectangle (w=115,h=115,fill="red", stroke="red")|rotate(0) | repeat (3,rotate(120))
show(m1,m2,m3)
def square(color, side):
return rectangle(w=side, h=side, fill=color, stroke='none')
s3 = square(side=65,color='#7d1004') | repeat(10, rotate(30))
s2 = square(side=79,color='#ba1b09') | rotate(15)| repeat(10, rotate(30))
s1= square(side=97,color='orange') | repeat(10, rotate(30))
s0=square(side=117,color='#f4ff59') | rotate(15)| repeat(10, rotate(30))
show(s0,s1,s2,s3)
c2=circle(r=35,fill="yellow",stroke="none")
c3=circle(r=30,fill="green",stroke="none")
c4=circle(r=23,fill="white",stroke="none")
show(c2,c3,c4)
#inner layer
e1=ellipse(w=30,h=15,x=17,y=0,stroke='brown',stroke_width=3,fill="red") | rotate(25)
p=e1 | repeat(30, rotate(45))
c5=circle(r=15,fill='yellow',stroke='yellow')
c6=circle(r=12,fill='white',stroke='white')
show(p,c5,c6)
def tinkerhub():
r1 = rectangle(w=105, h=50, fill='#2CC0CF', stroke='none', x=-45, y=70)
r2 = rectangle(w=50, h=50, fill='#2078F9', stroke='none', x=50, y=70)
l1 = r1 + r2
l2 = rectangle(w=175, h=50, fill='#FECD3D', stroke='none', x=-12, y=0)
r1 = rectangle(w=70, h=50, fill='#EE3C35', stroke='none', x=-65, y=-70)
r2 = rectangle(w=42, h=50, fill='#91BF23', stroke='none', x=0, y=-70)
r3 = rectangle(w=42, h=50, fill='#045768', stroke='none', x=52, y=-70)
l3 = r1 + r2 + r3
return combine([l1, l2, l3]) | scale(0.08) | translate(x=1)
logo = tinkerhub()
show(logo)