GeoGen Script reference
Example: Tepui

This script creates a tepui, a mountain with almost completely flat top and extremely steep mountainsides.

examples_tepui.png

The map is finite in both the horizontal and vertical directions.

metadata
{
Width: Finite,
Height: Finite,
Name: "Tepui",
Description: "Mountain with extremely steep mountainsides and almost flat top.",
Author: "Matěj Zábský"
}

The lowland and the highland (the mountaintop) are built separately. The lowland is medium-range noise with a cone-shaped peak in the middle (do that the terrain eases a bit into the cliffs). The height overflow in the center doesn't matter, it will be replaced by the tepui itself.

var lowland = HeightMap.RadialGradient(@[0.5, 0.5], Parameters.MapWidth * 0.44, 1, 0)
.Blur(50)
.Add(0.2);
examples_tepui_lowland.png

The highland is a low-range noise offset to the high altitude of the mountaintop.

var highland = HeightMap.Noise(CreateNoiseLayers(256), 3)
.Multiply(0.1)
.Add(0.9);
examples_tepui_highland.png

The mask is build similarly to the lowland, except it is turned to a monochrome image and then blurred a bit to make the cliffs somewhat less sharp. Note that each of the layers uses a noise with a different seed, so that different noise is generated each time.

var mask = HeightMap.RadialGradient(@[0.5, 0.5], Parameters.MapWidth * 0.4, 1, 0)
.Blur(50)
.Add(0.4)
.CropHeights(0.7, 1, 0)
.CropHeights(0, 0.7, 1)
.Blur(5);
examples_tepui_mask.png

The lowland and the highland are then combined together using the mask.

var main = highland.Combine(lowland, mask);
yield main;

Full code