A concise OpenSCAD implementation of the Runge Kutta routine for numerical integration is provided. It accepts systems of ordinary differential equations of arbitrary dimensionality. The possibilities are endless!
As an application example I chose the beautiful Aizawa attractor which is computed in just few lines of code. I also tried to print it, but I had no success so far. The main problem is the poor rigidity of the partially printed structure which doesn't remain steady when the head travels on its top. Maybe dual extruding some PVA support... let me know if you succeed!
Note: to run the scad file the following libraries are necessary
Overview and Background
Having an handy and good accuracy numerical integrator in OpenSCAD makes it possible to explore the vast world of differential equations, including Cauchy problems, Poincare sections, and the fascinating chaotic behaviour of non integrable systems. With immediate plotting/visualization capabilities and the possibility to export a and print a solid model, the student can be pushed to explore parameters and dependencies and eventually produce some nice math-art!
Lesson Plan and Activity
A nice set of differential equations should be selected and explored, these can include physical objects such as:
- damped and forced oscillators
- mechanical chaotic system such as the (spherical) double pendulum
or pure mathematics:
A computer and OpenSCAD.