trajectories function

Get the trajectories