What is procedural terrain generation?
In game development, procedural terrain generation is the term for various techniques of creating maps for your players to explore that are random and new every time. They should still feel coherent, though, not too random. In the early days of Minecraft, for instance, you could cross a line in the world and go from a desert into snow. Later versions of the game improved their terrain generation to create more gradual transitions in temperature, precipitation, and elevation.
There are two main techniques, in my experience. The first, wave function collapse, is not really suited for large-scale features like continents, oceans, and mountain ranges. The second is to use several layers of coherent noise, classically Perlin noise.

Through tuning various parameters and combining several layers, these maps can look quite good, and this is the basis for terrain generation in a lot of games today. Minecraft and Factorio, to name some examples.
Terrain generated with this technique inevitably bears some marks, however. Clearly defined continents and strings of islands, for instance, tend to be less common than in real world geography. Mountain ranges are typically blob-shaped instead of long and winding.
Simulating tectonic activity
In the real world, continents and mountain ranges often line up with tectonic plates and the boundaries between them, so I decided to simulate tectonic activity.
To create the plates, I use Voronoi cells. Each cell is assigned a vector representing its direction of drift. The wiggly edges below are the result of using a non-Euclidean distance metric.

At each plate boundary, the relative drifts of the two plates are compared to determine the appropriate tectonic effect. Colliding continental plates produce orogeny, visible as mountain ranges. Continental plate colliding with oceanic plate leads to subduction, visible as an oceanic trench on one side and a mountain range on the other.

The subduction zones give this map a few nice, not-so-blobby mountain ranges. The seas also have a clearer shape to them than the Perlin noise seas above.
Some possible refinements I might make, if I were to reuse this in a game, would be:
- Find a better distance metric that avoids narrow slivers of tectonic plate.
- Layer more noise, particularly near sea level and at high elevations to create islands and mountain peaks.
- Assign continental and oceanic zones in a more coherent way to give continents a clear outline and have fewer inland seas.
