dessiner avec chuck, premier pas

This commit is contained in:
tth 2021-07-22 18:34:34 +02:00
parent 2a8c892e33
commit 11cd7dbf5e
1 changed files with 9 additions and 7 deletions

View File

@ -1,10 +1,14 @@
/* /*
* dessiner par OSC avec le laser de Gaby * dessiner par OSC
* (avec le laser de Gaby ?)
*
* nouveau Rural Art System 2021 - TerreBlanque
*
*/ */
9000 => int OSCPort; 9000 => int OSCPort;
31000.0 => float Amplitude; 31000.0 => float Amplitude;
OscOut xmit; OscOut xmit;
float dx, dy; float dx, dy;
@ -22,17 +26,15 @@ xmit.send();
for (0 => int foo; foo<25800; foo++) { for (0 => int foo; foo<25800; foo++) {
<<< foo >>>; <<< foo >>>;
Amplitude * Math.sin(foo * 0.70001) => dx; Amplitude * Math.sin(foo * 0.30001) => dx;
Amplitude * Math.cos(foo * 0.50001) => dy; Amplitude * Math.cos(foo * 0.50001) => dy;
xmit.start("/joystick/xy"); xmit.start("/joystick/xy");
Std.ftoi(dx) => xmit.add; Std.ftoi(dx) => xmit.add;
Std.ftoi(dy) => xmit.add; Std.ftoi(dy) => xmit.add;
xmit.send(); xmit.send();
0.001::second => now; 0.03::second => now;
} }