tags:

views:

92

answers:

3

Does any have an algorithm for creating infinite terrain/landscape/surface?

Constraints

  1. The algorithm should start by a random seed
  2. The algorithm should be one to one, (the same seed gives the same result)
  3. Other input parameter are allowed as long as 2 is fulfilled
  4. The algorithm may output a 2d map
  5. It suppose to create only surface with varying height (mountains), not three, ocean etc.
  6. I’m looking for an algorithm and not a software.
  7. It should be fast

None of other related questions in here answers this question. If anything is unclear please let me know!

+3  A: 

http://en.wikipedia.org/wiki/Perlin_noise

Mchl
+4  A: 

I would suggest something like Perlin noise, I've used it before for something like you're describing above, and it fits the bill. Check out this Example and you can see the sort of output you would expect from the noise generator.Here is a link to algorithm p-code too.

http://freespace.virgin.net/hugo.elias/models/m_perlin.htm

jasper
A: 

As others already said perlin noise is a possibility. Gpugems 3 has a nice capter about procedual generation using (IIRC, it has been some time since I read this) 3D Perlin noise.

Of course there are other methods too, e.g. Vterrain.org might be worth a look.

Grizzly