For my Nature of Code final I implemented a version of my thesis that allowed path following in Ruby-Processing along 3D vectors. Boxes would start at a point at the bottom of the 3D map and travel along pre-determined routes. These routes represented the flights of U.N. planes over Sudan. The height of the arcs and start and end points represented the relative length of the flights. the number of boxes travelling represented the relative frequency of the flying involved. Unfortunately, I accidentally overwrote the files I showed in class. But I do have the individual class files I wrote to implement this functionality. These are pretty straightforward ports of Shiffman’s particle system class and path-following classes. Below is a 3d Particle / Emitter after running for an hour or so. (I forgot it on my desktop).
The main code I used was this simple Path-Following implementation, which was pretty easily hooked into my project. Just add some start & endpoints, calculated the endpoints, and shoot those boids off into space. Here’s the Github version of Shiffman’s Path Following – just a one-to-one port into Ruby-Processing. Some more customized stuff follows below.
Spirograph
The main code for the spirograph goes something like below. You can get all of this code on Github, and you’ll need to get it all because you need ToxicLibs, and the attractor & particle class. And PeasyCam. But at least you get an idea of what’s going on.







