c = circle(fill="orange") shapes = [c] colors = ["purple", "red", "pink", "orange"] NUM = 40 X = 16 def poo(scaleVal): for i in range(X): shapes.append(ellipse(fill=colors[i % 4]) | rotate((360 / X) * i) | scale(scaleVal)) def yellowE(scaleVal): for i in range(NUM): shapes.append(ellipse(stroke="red") | rotate((360 / NUM) * i) | scale(scaleVal)) yellowE(1) i = 0.5 for _ in range(10): poo(i) shapes.append(circle(r=i * 60, fill="pink")) yellowE(i / 2) i /= 2 show(*shapes)