Statistical Mechanics and Fractals