calculation fractal dimension