Serving tech enthusiasts for over 25 years. TechSpot means tech analysis and advice you can trust.
What the heck is that? Marble Fountain is a piece of “tech art” that looks like a huge tangled mess of string. However, flip a switch and ball bearings trickle forth, each riding one of eight complicated tracks to the bottom of the sculpture before being conveyed to the top again by a ball screw. It is mesmerizing to watch.
We’ve all seen marble runs before, but they are usually handmade with only a few tracks at most. However, mechatronics engineer Will Morrison wanted to kick it up a notch, so he devised an algorithm that used procedural generation to draw the splines of its eight tracks.…
Serving tech enthusiasts for over 25 years. TechSpot means tech analysis and advice you can trust.
What the heck is that? Marble Fountain is a piece of “tech art” that looks like a huge tangled mess of string. However, flip a switch and ball bearings trickle forth, each riding one of eight complicated tracks to the bottom of the sculpture before being conveyed to the top again by a ball screw. It is mesmerizing to watch.
We’ve all seen marble runs before, but they are usually handmade with only a few tracks at most. However, mechatronics engineer Will Morrison wanted to kick it up a notch, so he devised an algorithm that used procedural generation to draw the splines of its eight tracks. He thought it was going to be a simple weekend project, but he quickly got swept up in a multi-month design fest.
“I started this just planning for the janky splines as a weekend project, but it has gotten thoroughly out of hand,” Morrison wrote in his blog last week.
The twisting tower of tracks is a fully 3D-printed marble run, worthy of display in an art gallery. In fact, when Morrison applied to show it in the New Alliance Gallery in Somerville, Massachusetts, the curator eagerly accepted.
Morrison partly blames his place of employment for the project’s ballooning scope. He had recently begun work as a systems integration engineer at a lab with some of the best and biggest 3D printers money could buy.
“After starting work at Formlabs in September of 2023 and gaining access to much nicer printers than I was used to, I started wanting to tackle some large algorithmic structure projects,” he said.
His goal was to create a run that took up as much available print space as possible. He began by having a script drop random points through a virtual print volume, then connecting those points with splines to form paths in OpenSCAD. Each path maintained a constant downward slope so that a steel ball could roll from top to bottom without stopping. The early results worked – but they were too simple. So he wrote a solver to create multiple paths that would fill every bit of printable space while staying functional.
The solver follows a strict set of rules. The tracks must stay within bounds, keep even spacing, maintain minimum and maximum turning radii, and keep a constant slope. Each segment of track repels others to prevent collisions, smooths out slope changes to avoid jumps, and constantly adjusts itself to keep the balls moving. What emerges from these constraints is a kind of controlled chaos – a web of interlocking curves that feels more organic than artificial.
Keeping the marbles moving smoothly turned out to be more challenging than generating the tracks. Straight sections would let the marbles accelerate too much, while slow turns drained their momentum. The solution Morrison came up with was counterintuitive. He made the paths snake constantly and bank aggressively, keeping the ball speed under control.
Morrison said he got burned out after some 65 iterations. However, he might revise and refine the algorithm in a future side project.
“This was the most work I have ever put into a hobby project,” he said. “The final models take around 5-20 minutes to export. I have vague ambitions to do a big rewrite eventually but figured sharing janky code is better than none.”
Those interested can find his code on GitHub.
Found is a TechSpot feature where we share clever, funny, or otherwise interesting stuff from around the web.