public static function minDimensions(int $n, float $maxDistortion = 0.1) : int
    {
        return (int) round(4. * log($n)
            / ($maxDistortion ** 2 / 2. - $maxDistortion ** 3 / 3.));
    }