[Haskell-cafe] Re: Zippers, Random Numbers & Terrain
apfelmus at quantentunnel.de
Mon Jul 30 04:51:48 EDT 2007
Thomas Conway wrote:
> To amuse myself while waiting for test-runs to complete, I was
> thinking about random terrain generation. I came across a bunch of
> nice posts by Torben Mogensen, where he describes a neat way of
> constructing random terrains by recursively subdividing right angled
> isosceles triangles. It got me thinking - it's all well and good
> subdividing to give more detail as you zoom in, but what about when
> you zoom out?
Can you post a hyperlink for an exact description of the algorithm?
> This got me thinking that it would be cool to make an infinite terrain
> generator using a zipper, so you can zoom in/out infinitely, and by
> implication, infinitely in any direction.
An infinite random terrain sounds like great fun :) I can't say whether
it's possible or whether zippers are needed without knowing the details,
One problem is probably having a "point of reference", i.e. one needs a
point (0,0) with a fixed height 0. In the bounded case, one has a
rectangle to subdivide instead.
More information about the Haskell-Cafe