It makes maps! The circle is to test the radius which I think I am restraining it too. It is fairly elastic though, so this isn't really a big help.
Letting it off the leash. Also with a small step size. Looks smokey!
Shows the distribution well. Random walk has an advantage over random points, for landmasses, because everything is by default connected. Using some alpha to show how often it retraces it's steps shows up well how much foot traffic ends up in the centre.
3D! Heightmaps! I had to store all the visited points in a dictionary to do it, so I could index them by their location, and then store the 'frequency of visits' next to each point so I could measure how 'dark' each square is. The random walk might be 5000 steps, but the dictionary only has a few hundred entries, since it goes over old terrain often. I can use this 'darkness' information to determine the height of each location.
Colours! Mapping the frequency to saturation is nice too.
Adding in some directional lighting and letting the walk breathe a bit, I get some nice harbour cities.
Changing a few things and scaling up, we get some very nice landscape happening. Perhaps a few too many holes to be realistic, but still interesting.
Hue! This is about the point where I add all kinds of fun mouse and keyboard controls! There are tons in this one, perhaps I should post the code just so people can play with it.
Reducing the size of the elements (without reducing the space between them) creates some nice effects.
No comments:
Post a Comment