Dimension by Box-Counting

Background - Box-Counting Dimension

Natural fractals do not contain similar copies of themselves. How can we measure their dimension if there is no apparent scaling factor?

Motivated by our Euclidean observations, we

Denoting by N(r) the number of grid boxes of side length r touching any part of the shape, we adopt the assumption, and it is an assumption, that

N(r) = k((1/r)d),

where k is the constant of proportionality, 1 in our previous examples. Solve for d by taking the log of both sides, obtaining

log(N(r)) = dlog(1/r) + log(k).

Here d and k are constants, log(N(r)) and log(1/r) vary with r, so this has the form

y = mx + b

of the equation of a straight line with slope d. Because d is interpreted as a dimension in our original scaling relation, we interpret it as a dimension in this more general setting. This d is called the box-counting dimension.

Suppose we have counted boxes for grids with side lengths r1, r2, ..., rN. To calculate d from these box counts

If the assumpton N(r) = k((1/r)d) is correct, the points should lie (approximately) on a straight line. This is some evidence for fractality, though in general more is needed; for example, if the shape exhibits similar sorts of structure over a range of scales.

For natural fractals the relation N(r) = k((1/r)d) holds only for a limited collection of r values, the scaling range.

Box-counting dimension can be computed for mathematical fractals. In general, more detail is revealed with smaller r values going to 0, so for mathematical fractals we take the limit

d = limr -> 0 (log(N(r)) - log(k))/log(1/r)

Because k is a constant, an equivalent and simpler formulation is

d = limr -> 0 log(N(r))/log(1/r)

For natural fractals with a limited scaling range, this limit may not be the most successful approach. Rather, we rely on plotting the points (log(1/r), log(N(r))), identifying the scaling range, and finding the slope of the best-fitting line through the points in the scaling range.

Return to Background.