
One standard way to make a fractal curve is to take a straight line, cut it in half, and move its mid-point a random amount. You then do the same with the two halves, but move their midpoints by a smaller random amount. If you keep going you end up after a few times with something like the picture above.
This is a way to generate artificial coastlines. If you do it with a triangle instead of a line and move the midpoints of its edges out of the plane of the triangle, you make an artificial fractal landscape (shown here flooded):

Here's a new way to do this sort of thing.
Take a box (blue) with a single diagonal line in it (black). Split the line in half and move it as far as you can without a disc on the split-point hitting anything. You get this:


Here it is after splitting ten times.
If you start with the four edges of a square (filled in red here so you can see what happens):

And let it run you get this:

No comments:
Post a Comment