Generate pruned trajectories.