See a further experiment here
http://learning-ruby-processing.blogspot.com/2012/02/using-toxiclibs-volumeutils-etc-in-ruby.html, for a similar example, although this time featuring toxiclibs for the mesh creation. This sketch features the implementation of an abstract java class in ruby-processing (jruby), given the relative lack of jruby documentation I thought that may also be of interest. Frustratingly the the thing that took me longest to sort out was the old chestnut of float vs integer division. Here is a screenshot with a
variant using the ruby-processing control panel.