Discriminating curved from straight motion trajectories in 3D scenes