Skip to content

3D simulation of modular blocks generating an endless marble run

License

Notifications You must be signed in to change notification settings

Nurgak/Endless-Marble-Run

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License: MIT

Endless Marble Run

endless_marble_run.mov

This repository hosts the script and assets for the Endless Marble Run: a 3D simulation of modular blocks generating an infinite marble run, similar to CUBORO™ marble run system, using the p5js library.

The collision checking is implemented from scratch and limited to sphere interaction with points. It is possible to view the collision information by setting the debug flag in the code to true.

Note

In some rare cases the ball may get stuck or fall off the track, in these situations the simulation has to be restarted.

One limitation is that the cubes cannot be traversed more than once, which would add excessive complexity to the code.

Usage

Either view the animation on GitHub pages, edit the code in the p5js editor or clone the repository and run locally.

Click on the canvas to switch between following mode and first-person-view mode.

Double-click toggles the full-screen mode.

Assets

The assets were created using JSCAD. To view and edit them load the contents of assets/boxes.js to the JSCAD editor.

Box generator using JSCAD

License

This software licensed under MIT license.