A little something I knocked together in Processing language (source code here). I used a bit of calculus to determine the trajectories of the sparks — nothing too tricky, just a bit of integration.
I have an idea for an animation (or maybe a game?) which would involve finding the roots of a 4th degree polynomial to determine where a trajectory (two quadratics) will intersect with a circle. I’ll be using NumPy to do this, as once you’ve defined the polynomial NumPy can find the roots automatically.
I’ll also investigate NumPy alternatives for Java so that I can use Numerical programming with Processing.