12345678910111213141516171819 |
- import math
- import time
- w = 80
- h = 20
- for x in range(w):
- d_x = x / 80.0 * 360
- r_x = math.radians(d_x)
- sin_y = math.sin(r_x)
- sin_y = sin_y + 1.0
- _y = sin_y / 2.0 * h
- i_y = int(_y)
- # print(f"{i_y},{x}")
- print(F"\033[{i_y};{x}H*", end="")
- # time.sleep(1)
|