Terrain Algorithms
Filed under Projects
This page details the terrain algorithms used in both the Terrain Library and the Terrain Editor.
The Algorithms
Fault Algorithm
The fault algorithm causes a vertical shift of a chosen size along the entire stretch of the terrain.
Here is an image that shows a flat terrain which has had one iteration of the fault algorithm applied to it with a displacement of 10 units.
Fault Sine Algorithm
The fault sine algorithm causes a vertical shift of a chosen size along the entire stretch of the terrain, the vertical shift in the terrain is curved using a sine wave.
Here is an image that shows a flat terrain which has had one iteration of the fault algorithm applied to it with a displacement of 10 units and a sine wave length of 10 units.
Fault Cosine Algorithm
The fault cosine algorithm causes a vertical shift of a chosen size along the entire stretch of the terrain, the vertical shift in the terrain is curved using a cosine wave.
Here is an image that shows a flat terrain which has had one iteration of the fault algorithm applied to it with a displacement of 10 units and a cosine wave length of 10 units.
Circles Algorithm
The circles algorithm creates a half sphere hill or though in the terrain, the size of this hill depends on the circle size and the depth depends on the displacement.
Here is an image that shows a flat terrain which has had one iteration of the circles algorithm applied to it with a displacement of 10 units and a circle size of 10 units.
Smoothing Algorithm
The smoothing algorithm uses vertex neighbour averaging to smooth the entire terrain.
In the Created Terrains section below you can see before and after screenshots of terrain.
Created Terrains
Fault Algorithm
Terrain created using 1,000 iterations of the fault algorithm with a displacement of 1.
Here is the same terrain after applying one iteration of the smoothing algorithm.
Fault Sine Algorithm
Terrain created using 500 iterations of the fault sine algorithm with a displacement of 10 and a wave size of 5.
Here is the same terrain after applying one iteration of the smoothing algorithm.
Fault Cosine Algorithm
Terrain created using 2,000 iterations of the fault cosine algorithm with a displacement of 5 and a wave size of 50.
Circles Algorithm
Terrain created using 1,000 iterations of the circles algorithm with a displacement of 10 and a circle size of 100.
Mixture Of Algorithms
Terrain Created Using:
- Fault Algorithm
- 600 iterations
- Displacement 1 unit
- Fault Sine Algorithm
- 600 iterations
- Displacement 2 units
- Wave size 5 units
- Fault Cosine Algorithm
- 800 iterations
- Displacement 2 units
- Wave size 5 units
- Circles Algorithm
- 200 iterations
- Displacement 3 units
- Circle size 50 units
- Smoothing Algorithm
- 1 iteration
Jul29










