Mesmerizing Marble Runs From Procedural Generation

A central circular element is releasing steel ball bearings into a complex nest of eight intertwined plastic paths.

There are few things that can keep a certain kind of mechanically-inclined mind entranced as well as a marble run, and few structures that look as interestingly organic as procedurally-generated designs – combine the two and you get [Will Morrison]’s Marble Fountain.

[Will]’s first approach to generating a marble run was to have a script randomly place some points, generate a path following a spline through those points, and give that path a constant slope. This worked, but the paths it generated were a bit too simple to take full advantage of a 3D printer’s capabilities, so he next wrote a path solver to generate more complicated runs. The solver starts by generating a series of random line segments connecting the top and bottom of the run, then iteratively moves the segments into position. Each segment has to stay within the print volume, be evenly spaced with the others, maintain a constant slope, avoid segments from other tracks, and avoid distant segments of its own track. The result is a complicated network of tracks that keeps the marbles in motion without letting them fly out in fast sections.

A motorized screw runs through the center of the marble fountain and brings marbles back to the top. The screw is constrained on all sides by the rolling marbles, essentially like a ball screw, which lets it avoid using another bearing at the top of the structure. The supports for the tracks grow downward, merging with nearby supports, repelling from other paths, and converging toward a ring around the central screw. A few Python scripts handle the generative algorithms and use OpenSCAD to generate the actual 3D files. The persistence involved in this project is admirable – [Will] went through about 65 design iterations to get these results.

We’ve seen a few computer-generated marble runs before, though it’s fair to say that this is by far the most complex. We’ve also seen another mesmerizing mechanism to bring marbles back to the top of a marble run.

10 thoughts on “Mesmerizing Marble Runs From Procedural Generation

  1. Rather understated video, compared to magnitude of both the effort and effect.

    Thanks for including the sound of all the balls in the tracks: multiplicity makes me happy; and thanks for the video showing the single escaped ball beneath the machine: verisimilitude and honesty are in short supply these days.

  2. Utterly captivating. I can’t find any obvious mention of designing the tracks to keep the marbles from flinging themselves off – surely a design consideration for these things.
    But an extension to this excellent work is to have the solver solve for constant speed marbles (or even constant acceleration), or for each track having the same duration, which might produce some interesting visual effects. Then it’s only a small leap to rollercoaster design!

    1. ‘constant slope’…

      There is lots of work to be done making something like this.
      But with banked turns, upslopes, loops and crossing jumps (that secretly demonstrate atomic physics concept of ‘cross section’, break random things in room).

      Volunteers??

      I already came up with the idea…F-off.

      Use an AI to do it, skip straight to ‘Profit’ step.

  3. Can I haz that for water drops now, please? As a kind of fountain?

    I do have a recipe for a surface coating with hydrophobic properties and an extreme contact angle somewhere around, somewhat akin to lotus leaves…

Leave a Reply to scott_txCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.