Morse-Smale approximation, regression and visualization