Morse-Smale Decomposition , Cut Locus and Applications in Sensor Networks