We can now experiment with box-counting dimension using the NetLogo model called boxcountingdimension.nlogo. Here you can see that this allows us to iterate examples of fractals just like we did in the previous model. So let's go for 4 iterations of this. But we can do at this point now is compare the Hausdorff dimension, 1.262 that we calculated, with a box-counting approximation. So I'm going to do Box-Counting Setup here and you can see there's an initial box length set to 10, which you can change. So here's the initial box right down here and the increment is going to be 1.0. So we're going to increase the box size by 1 unit at each iteration. Ok, so here this tells us how many boxes there are and so on. And watch over here as we do box counting where the model is going to plot the log of the number of boxes versus the log of 1 over the box length for each iteration. So let's just go ahead and do that with Box-Counting Go. Now this is just like we saw where we're putting a grid of boxes over the figure. You don't see the whole grid. You're only seeing the boxes that contain pieces of the figure. And at each time step, see iteration, we see what the box length is and the number of boxes that is being counted. And here those values are being plotted. And you see they're sort of beginning to approximate a straight line. So if we keep going, the boxes get bigger and bigger. And then we can stop it by clicking again on Box-Counting Go at any time. I haven't actually run it for very long, but I have some points and what I can do is say Find Best Fit Line. That does a linear regression and computes a box-counting dimension here of 1.122, which is a little bit different than the Hausdorff dimension of 1.262. Now that's because, remember box-counting is just an approximation. We can get a better approximation if we start with a smaller initial box length, or if we start with a smaller increment. But that, of course, is going to take longer. So let's start over with our Koch curve. Iterate, iterate, iterate...ok. And our approximation would also be improved if we iterated more. Box-counting Setup, and Go. I can speed this up, but it's still kind of a slow calculation. Net Logo is not known for its extreme speed of computing. It's kind of a trade-off. It's easy to program in, but not super fast. But anyway, now you can run this, go away. Go get a cup of coffee, like computer scientists like to do while waiting for their program to finish. And let it run for many iterations and then see how well the box-counting dimension approximates the Hausdorff dimension. And you'll see that the next exercise is to test that out.