Requirements

jruby it is important that jruby is on your path preferably /usr/bin/jruby (you can create a symbolic link if your install method does not do it for you)

Install jdk-11+

Install jruby-9.3.1.0+

Install from rubygems

jruby -S gem install math_demo
# or
jgem install math_demo
# or if default ruby is jruby
gem install math_demo

Congratulation you have installed propane a standalone version of ruby-processing, compiled with jdk11

How do I run it?

math_demo
# or to be safe
jruby -S math_demo

What’s happening

Three random moving particles are created (they are restricted to moving in the frame). The display is the outline of an ellipse (circle) that is a circumcircle. That is circle that goes through three points given by the particles position. The color of the circle, changes gradually, apart from being constrained (by the frame) the points also sometimes change direction randomly. Periodically the whole sketch is refreshed.

Why?

This is very much a taster of what can be done with propane, a batteries included ruby-wrapper for processing-3.3.6. See more examples here

animation.gif