Fractal dimension structure algorithm