Smoothing linear trajectories.