~ $ cd worlds && cat *
Worlds
Mons fractals was a university graphics assignment from before the year 2000: Java 1.1.8 on MS-DOS, a pipeline of filters that grew a planet and wrote it out as VRML for a browser plugin to fly around. This is the same pipeline, in TypeScript, with nothing underneath it, and the dials on the outside so you can play.
Drag the world to turn it; let it go and it keeps turning. Every dial is one of the filters:
- Seed picks the world. The same seed always grows the same one.
- Detail is how many times every edge is split in two. Each round has four times the triangles of the one before; six rounds are 81,920.
- Roughness is how far a new midpoint may move, as a fraction of the edge it came from. The 1999 default was 0.1; a little more makes for better mountains at this size, and a lot more makes something that is not a planet.
- Sea is the share of the surface under water. The sea is a minimum radius: everything below it is raised up to it.
The pipeline runs in order, and the order is the meaning: raise the land, put in the sea, work out the climate from height and latitude, and only then paint. Paint first and there is nothing to paint.