Bricklayer Experiment

This experiment was put together as being a possible boilerplate for the creation of our 'creatures.' We originally conceived our creatures as being made up of interconnected cubes, as cubes are simple and easy-to-manipulate objects that pack together well.

The experiment is seeded with a 'root' cube. Holding Spacebar will procedurally attach a new cube to a random face of the root cube, and then the next cube, and so on, attaching a randomly-oriented cube to the last-created cube. Each cube is coded to reposition and reorient itself relative to the cube it was attached to if its position or rotation changes. What results is a fluid, propogating motion that flows outward from the root cube.