2D and 3D verlet integration