Skip to content

Instantly share code, notes, and snippets.

@dtbao20
Created December 29, 2023 12:20
Show Gist options
  • Save dtbao20/2a556e509d4d815a5ea0fd2ecbc344e4 to your computer and use it in GitHub Desktop.
Save dtbao20/2a556e509d4d815a5ea0fd2ecbc344e4 to your computer and use it in GitHub Desktop.
πŸ’—
# inspired by https://www.dwitter.net/d/28950
from turtle import *
bgcolor(0,0,0), setup(500,500)
hideturtle(), tracer(0), penup()
from math import sin, cos
from time import perf_counter
def _Oneo_Kuu():
update(), clear()
t = perf_counter()
for i in range(400):
if cos(i)<0: continue
a = t-sin(t*2+sin(t)+i**2)
a = sin(a+sin(a)) + 1
X = (350-200*sin(a))*cos(i)*sin(2+i/2+0)
Y = (350-200*sin(a))*sin(i+0.7**cos(i)**0.05)
color = (1,0,sin(i+t+sin(t/2))/3+1/3)
goto(X, Y-30)
dot(30+9*sin(X/50+t*5), color)
ontimer(_Oneo_Kuu, 10)
_Oneo_Kuu()
mainloop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment