

Gravity simulation on a desktop computer 
The graphs in this article were generated by simulating the same GravSim 2body model for 201 orbits and drawing every 20th orbit.
The following initial conditions were used an should lead to successive elliptical orbits of eccenticity 0.78:
2  Mass  Pos(x)  Pos(y)  Pos(z)  Vel(x)  Vel(y)  Vel(z)  
0  1.0  0.0  0.0  0.0  0.0  0.02  0.0  
1  0.1  5.0  0.0  0.0  0.0  0.2  0.0 
For each integrator, graphs are shown for levels 1, 2 and 3 for both Constant and Variable timesteps.
The settings for each integrator have been manually tuned to use as many steps per orbit as necessary to produce graphs that appear similar at level 1 (i.e. have approximately the same magnitude of accumulated errors after 201 orbits). This is necessarily subjective.
Each successive level uses a factor of squarerootof2 times more steps than the previous level. Hence level 3 uses twice as many steps as level 1.
The accuracy at levels 2, 3 and beyond depends on the quality of the integrator itself  in particular the "order"  which dictates how quickly the errors reduce with increasing numbers of steps.
Level  Constant TimeSteps  Variable TimeSteps 

1  500000 steps per orbit 
144000 steps per orbit 
2  707106 steps per orbit 
203646 steps per orbit 
3  1000000 steps per orbit 
288000 steps per orbit 
Level  Constant TimeSteps  Variable TimeSteps 

1  250000 steps per orbit 
72000 steps per orbit 
2  353554 steps per orbit 
101823 steps per orbit 
3  1000000 steps per orbit 
144000 steps per orbit 
Level  Constant TimeSteps  Variable TimeSteps 

1  900 steps per orbit 
400 steps per orbit 
2  1273 steps per orbit 
566 steps per orbit 
3  1800 steps per orbit 
800 steps per orbit 
Level  Constant TimeSteps  Variable TimeSteps 

1  8000 steps per orbit 
1151 steps per orbit 
2  11313 steps per orbit 
1628 steps per orbit 
3  16000 steps per orbit 
2302 steps per orbit 
Level  Constant TimeSteps  Variable TimeSteps 

1  2000 steps per orbit 
287 steps per orbit 
2  2828 steps per orbit 
406 steps per orbit 
3  4000 steps per orbit 
574 steps per orbit 
Level  Constant TimeSteps  Variable TimeSteps 

1  500 steps per orbit 
143 steps per orbit 
2  707 steps per orbit 
202 steps per orbit 
3  1000 steps per orbit 
286 steps per orbit 
Level  Constant TimeSteps  Variable TimeSteps 

1  1000 steps per orbit 
333 steps per orbit 
2  1414 steps per orbit 
471 steps per orbit 
3  2000 steps per orbit 
666 steps per orbit 
Level  Constant TimeSteps  Variable TimeSteps 

1  666 steps per orbit 
216 steps per orbit 
2  942 steps per orbit 
305 steps per orbit 
3  1332 steps per orbit 
432 steps per orbit 
Level  Constant TimeSteps  Variable TimeSteps 

1  666 steps per orbit 
216 steps per orbit 
2  942 steps per orbit 
305 steps per orbit 
3  1332 steps per orbit 
432 steps per orbit 
Level  Constant TimeSteps  Variable TimeSteps 

1  666 steps per orbit 
216 steps per orbit 
2  942 steps per orbit 
305 steps per orbit 
3  1332 steps per orbit 
432 steps per orbit 
Level  Constant TimeSteps  Variable TimeSteps 

1  666 steps per orbit 
216 steps per orbit 
2  942 steps per orbit 
305 steps per orbit 
3  1332 steps per orbit 
432 steps per orbit 
Level  Constant TimeSteps  Variable TimeSteps 

1  250 steps per orbit 
75 steps per orbit 
2  353 steps per orbit 
106 steps per orbit 
3  500 steps per orbit 
150 steps per orbit 
Level  Constant TimeSteps  Variable TimeSteps 

1  193 steps per orbit 
58 steps per orbit 
2  273 steps per orbit 
82 steps per orbit 
3  386 steps per orbit 
116 steps per orbit 
Level  Constant TimeSteps  Variable TimeSteps 

1  148 steps per orbit 
45 steps per orbit 
2  209 steps per orbit 
64 steps per orbit 
3  296 steps per orbit 
90 steps per orbit 
Note that the number of steps taken is an approximate target and will vary a little in practice, due to:
There are 2 tuning variables in the GravSim source code that control the relationship between the number of steps per orbit and the collision timescale (which is the only statistic available at run time). The settings for these variables is also subjective. For reference, they appear in basic.h and were set to the following values when generating these graphs:
#define CONSTANT_TUNING_FACTOR 5.6
#define VARIABLE_TUNING_FACTOR 18.0