import curses
import math
import time

def main(stdscr):
    curses.curs_set(0)
    stdscr.nodelay(True)
    stdscr.timeout(100)

    radius = 10
    center_y, center_x = curses.LINES // 2, curses.COLS // 2
    aspect = 0.5  # correction so it looks round, not oval

    while True:
        stdscr.clear()

        # Draw circle outline from 0° to 360°
        for deg in range(0, 360):   # full circle
            angle = math.radians(deg)
            x = int(center_x + radius * math.cos(angle))
            y = int(center_y + radius * math.sin(angle) * aspect)

            if 0 <= x < curses.COLS and 0 <= y < curses.LINES:
                try:
                    stdscr.addch(y, x, '.') # '█')  # solid block for continuous line
                except curses.error:
                    pass

        stdscr.refresh()
        time.sleep(0.05)

        key = stdscr.getch()
        if key == ord('q'):
            break

curses.wrapper(main)

