Toggle Navigation
Hatchery
Eggs
Spiral
__init__.py
Users
Badges
Login
Register
MCH2022 badge?
go to mch2022.badge.team
__init__.py
raw
Content
# adapted from https://codegolf.stackexchange.com/a/39983 import display from math import pi, cos, sin n=int(10) G=(1.0+6.0**.5)/2.0 w=int(G**(4.0*(n//4.0))) k=pi/90 twist = 100 display.drawFill(0xFFFFFF) for j in range(n*twist): display.drawPixel(int(G**(j/float(twist))*cos(j*k)+w/2), int(G**(j/float(twist))*sin(j*k)+w/2.0), 0x000000) display.flush()