I collect magic here for an onscreen movie.
The plan is to modify the physics C code to emit binary coordinates of line segment endpoints into a pipe from which a Java program would plot them.
Java, Java library
javac Echo.java echo "don't do that" | java -cp . Echoyields:
Enter the message : You entered : don't do that
javac Show.java gcc wbp.c -Wmost ./a.out | java -cp . Show=> 0 0 10 0 40 0 90 0 160 0 250 0 104 1 234 1 128 2 42 3
./a.out > xxcc od -t x1 xxcc=>
0000000 00 00 0a 00 28 00 5a 00 a0 00 fa 00 68 01 ea 01 0000020 80 02 2a 03 0000024Reading into a buffer works but is ugly and delivers signed bytes!
First class double buffering in Java seems to lead to the BufferStrategy class which is one of those classes whose contract fails to tell me whether I am the party of the first part or the second part. It clearly fails to isolate you from hardware details. I will try to avoid double buffering for now.
gcc a.c -Wmost -std=c99 -fnested-functions ./a.out > pipe javac Mv.java java -cp . Main < pipemakes a still.