  Motivated by finding an effective way to compute the algebraic complexity of
the nearest point problem for algebraic models, we introduce an efficient
method for detecting the limit points of the stratified Morse trajectories in a
small perturbation of any polynomial function on a complex affine variety. We
compute the multiplicities of these limit points in terms of vanishing cycles.
In the case of functions with only isolated stratified singularities, we
express the local multiplicities in terms of polar intersection numbers.
