Fix interpolated points generation

The interpolated points were being overwritten by the last segment
because the array of points were not being joined.
Make creation and manipulation of arrays better

The arrays are created only once but reset to length 0 per trajectory.
Add callbacks for the pause button
Cosmetic changes to make spheres smaller
Reduce the value of N to make things faster