This is my page for my terrain generator. Below are some screenshots of terrains created using the generator, and brief explanations of the algorithms I used.
All images produced by the generator were rendered in OpenGL, a commonly-used specification for a 2D and 3D graphics API.
Screenshots:
Terrain Terrain with flattening Terrain with island cluster Terrain with more hills Terrain with larger hill radii
Circle-Based Hills
Slope-Based Lighting
Procedural Texture Generation
References

A generated terrain.

A terrain with some flattening.

A terrain with hills clustered into an island.

A terrain with a larger number of hills.

A terrain with larger hill radii.
The hills are created based on circular bases. Each base has a random centerpoint (unless the hills are clustered) and a radius chosen randomly from within a specified range. The hills are then raised as parabolas according to the equation (Z = R^2 - ((X2-X1)^2 + (Y2-Y1)^2)
To generate the terrain, hills are raised repeatedly, with negative height values being ignored and the heights of overlapping hills being added. The heights are normalized (scaled to values between 0 and 1), and stored in a heightmap (an array of height values), where they can be retrieved easily as needed, and which is used to represent the terrain so that it can be rendered via OpenGL.
This terrain generator allows the option of "flattening" - raising the height values at each location on the terrain to a specified exponent (no flattening = an exponent of 1). Since the height values, thanks to normalization, are between 0 and 1, this lowers the low values while raising the peaks. In terms of scenery, it creates and broadens lowlands while forming steeper, craggier hills.
It also allows the option of forming a cluster, or island, with the hills. If the island option is turned on, rather than having random centerpoints, each hill has a distance and angle from the center of the terrain. The generator chooses the angle randomly from 0 to 2*pi radians. The distance (from the center of the terrain) for a given hill is chosen randomly within a range of zero to half the size of the heightmap minus the radius of the hill.
Slope-based lighting shades vertices according to height in relation to a nearby vertex. As the generator calculates the lighting for each vertex, it stores them in a lightmap, which is an array analogous to the heightmap. The heightmap stores height values for each vertex, the light map stores light values, and as the vertex is rendered by OpenGL, its color can be multiplied by the corresponding lightmap value to create lighting.
This creates an effect of realistic shadowing based on the placement of the light source. In addition, changing the softness of the light raises or lowers the constrasts between shadowed and unshadowed areas.
Procedural generation is a process in which one can create a new texture by combining the data from different textures.
This terrain generator uses three interpolated textures. Each texture has a minimum height, a maximum height, and an optimal height at which it can appear. At the optimal height, a texture's presence is at 100%, and it gradually fades to 0% as the heightmap values approach its maximum or minimum. As the regions in which the three textures can appear are overlapping, each location on the terrain is colored by some combination of the three textures which are present at the levels indicated by their own height range information.
The texture interpolation is used to create a colormap, which stores color information. The colormap is similar to the heightmap and lightmap in concept, but each location on the heightmap or lightmap corresponds to a set of three consecutive locations on the colormap, which contain the red, green, and blue components for that location. For example, the first, second, and third values in the colormap would correspond to the red, green, and blue components of the first heightmap (or lightmap) value, and the fourth, fifth, and sixth would correspond to the red, green, and blue components of the second heightmap value.
Fernandes, Antonio Ramires. Lighthouse 3d Terrain Tutorial.
Nystrom, Bob. Terrain Generation Tutorial.
Polack, Trent. Focus on 3d Terrain Programming. 2002.