draw some more frames

This commit is contained in:
Felix Pankratz 2024-12-17 10:29:03 +01:00
parent f1036a67f3
commit fc9171da08

View File

@ -3,6 +3,7 @@
import math import math
from color import Color from color import Color
from matrix import Matrix from matrix import Matrix
import time
import random import random
class Cell: class Cell:
@ -19,13 +20,15 @@ class Cell:
def main(): def main():
m = Matrix() m = Matrix()
cells = [Cell() for _ in range(2048)] cells = [Cell() for _ in range(2048)]
for index, cell in enumerate(cells): for i in range(255):
m.drawPixel(index % 64, index // 64, Color( for index, cell in enumerate(cells):
round(cell.get_value()*255), cell.state += 0.2
0, m.drawPixel(index % 64, index // 64, Color(
0 round(cell.get_value()*255),
)) 0,
m.show() 0
))
m.show()
time.sleep(0.3)
if __name__ == '__main__': if __name__ == '__main__':
main() main()