from machine import Pin, I2C
from ssd1306 import SSD1306_I2C
import math
i2c_oled = I2C(scl=Pin(25), sda=Pin(26))
oled_w = 128
oled_h = 64
oled = SSD1306_I2C(oled_w, oled_h, i2c_oled)
oled.fill(0)
x0, y0 = 64, 32
rx, ry = 50, 30
for x in range(128):
for y in range(64):
if math.isclose(math.pow((x-x0)/rx, 2) + math.pow((y-y0)/ry, 2), 1, rel_tol=0.01):
oled.pixel(x, y, 1)
oled.show()