Played around with OpenSCAD.Tried to do the same thing with recursion within OpenSCAD. UPDATE: I did some optimisation in the code, it runs now twice as fast... and with more colors!