How to generate random terrain
blog.habrador.com
blog.habrador.com
http://en.wikipedia.org/wiki/Geomorphology
For example, OpenSees is used for earthquake modeling.
http://opensees.berkeley.edu/OpenSees/workshops/OpenSeesDays...
It is more on modelling rather than generating though.
On procedural generation, we discussed[1] this app written in WebGL: http://creativejs.com/2012/06/snappytree
Other peopled did it with Three.js: http://catchvar.com/threejs-procedurally-generated-infinite-....
And finally, a really lively discussion[2] turned about The Death of the Level Designer: Procedural Content Generation in Games[3]
[1] http://news.ycombinator.com/item?id=4161263
[2] http://news.ycombinator.com/item?id=3872615
[3] http://roguelikedeveloper.blogspot.com/2008/01/death-of-leve...
1st version is free to download
Does anyone have any examples on a more specific 2d terrain generation (side-scroller).
It's entirely legitimate to see it as a side-view, in which case yes, you'd be cutting through the terrain.
http://i.imgur.com/HgMWbXe.png
the white dot in the center is a control point that the user can drag around. That point defines a mountain. Height decays exponentially with distance from the control point. The height function is perturbed by an underlying noise function.
Edit: It's all done in JS/WebGL using a fragment shader and blatting the output onto static canvas elements. These are then composited for the larger image. It supports scrolling and zooming. I could never get the performance quite to where I wanted it.
The algorithm defines some regular (columns, etc) and irregular (random walls) building blocks and then switches between them with Worley noise.
The code is available here: https://gitorious.org/crawl/crawl/blobs/master/crawl-ref/sou...
Here's the link: http://larc.unt.edu/ian/research/terrain/
Also, *yeah.
In Perlin noise, you set each grid point to a unit gradient vector, and then interpolate between them with a specific equation. This gives it useful mathematical properties, like being continuously differentiable, so the surface normals are smooth when you render it. That's not guaranteed with value noise.
http://webstaff.itn.liu.se/~stegu/TNM022-2005/perlinnoiselin...
There's a StackExchange discussion of the subjective differences here: http://math.stackexchange.com/questions/184121/why-is-gradie...
Value noise defines a pseudrandom value for each lattice point. Intermediate points are determined by interpolating the values of the adjacent lattice points. Value noise has discontinuous derivatives and looks blocky.
Gradient noise defines a pseudo-randomly oriented vector at each lattice point. To find the value of an intermediate point you interpolate the vectors.
If this stuff is interesting, I strongly recommend Texturing & Modeling: A Procedural Approach.