Calculate Local Density