Hi,
This is a good starting script to animate your gridball. You can define some variables if you need more calculation speed. The problem with your examples is that "n" is an integer but "t" in MathMod scripts is not a discrete variable.