Density and Slope Calculation