CalculateFracDim function

Calculates Fractal Dimension