balls are moving on my screen

This commit is contained in:
2025-08-20 00:08:26 -05:00
parent 7bf24beb45
commit e7a623b5a5
5 changed files with 63 additions and 31 deletions

23
tester.py Normal file
View File

@@ -0,0 +1,23 @@
import time
import numpy as np
import subprocess
from pathlib import Path
p = subprocess.Popen(Path("bin", "x64", "Debug", "LivePlotter.exe"), stdin=subprocess.PIPE)
x = 0
y = 0
z = 0
t = 0
period = 0.1
while True:
time.sleep(period)
x = 10*np.cos(t)
y = 10*np.sin(t)
z = 0
t += period
p.stdin.write(f"test {x} {y} {z}\n".encode("utf8"))
p.stdin.write(f"test2 {x} {-y} {z}\n".encode("utf8"))
p.stdin.write(f"test3 {-x} {y} {z}\n".encode("utf8"))
p.stdin.write(f"test4 {-x} {-y} {z}\n".encode("utf8"))
p.stdin.flush()