balls are moving on my screen
This commit is contained in:
23
tester.py
Normal file
23
tester.py
Normal 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()
|
||||
Reference in New Issue
Block a user