Simulation speed surges forward when varying the time increment and "Steps Per Display".
Stephen Salser
8 Posts
I tried to change the "Steps Per Display" so that finer calculations with a sorter time increment could be done only when necessary (for example when a close approach is imminent ).
I arranged it so that the product of "Steps Per Display" and the time interval is constant.
When I vary them slowly, the simulation works beautifully and maintains a constant speed even over four orders of magnitude in the "Steps Per Display".
However, when the "Steps Per Display" is reduced suddenly the simulation surges forward discontinuously, sometimes by several seconds.
Is there an elegant way to fix this problem so that finer calculations can automatically be applied when a collision is about to occur, and fewer calculations can be done once the collision is over?