limit time delta to 10 to avoid big jumps if requestAnimationFrame() takes too long.
added a variable for simulation speed.