I'm drawing a contour map representing gravity.
The algorithm is:
For each point on the screen (1 pixel per point) I calculate the gravitational pull for each object and combine (using Newtons law of universal gravitation) where M1 is a unit point mass.
Next I get the min and max values and create a palette of 10 colors scaled over this range.
I then generate a texture from this data.
For resolutions such as 1024 * 768 or greater this is expensive (takes > 1sec)
I'd like to be able to move the masses and see the contour map change in real time.
Any suggestions on how to optimise?