def picirc(radius, aspect_ratio=5):
    "Display the digit of pi in a circle of given radius"
    display_width = int(radius * aspect_ratio + 10)
    pi_str = repr(pi(int(2 * radius ** 2 * aspect_ratio)))
    pos = 0
    for i in range(2 * radius):
        cols = int(0.5 + aspect_ratio * (radius**2 - (radius-(i+0.5))**2) ** 0.5)
        print(pi_str[pos:pos+cols].center(display_width))
        pos += cols
Display the digit of pi in a circle of given radius
recipes/Python/578130_Pi_Circle/recipe-578130.py