Friday, January 13, 2017

Plate Tectonics

I've mentioned before PlaTec, a simple plate tectonics simulation program.  This evening a spent a little bit of time working on my old port of it to a Windows environment with an FLTK GUI.  I've fixed a few problems, and have added some basic export capabilities.  It's pretty basic, really.

First you enter some parameters.  Because the initial landmass is generated using the diamond square algorithm, the map must be square, and the dimensions must be powers of two.  The cycles indicates the number of cycles - splitting of the world into plates and moving them - that should be performed. The plates indicates the number of plates.  Sea level is a number between 0 and 1 approximating how much of the world should be sea.  The random seed determines the initial landmass shape as well as coordinates for the plate origins.  Restart energy ratio and restart speed limit determine how slow plate movement gets before a cycle ends; IIRC lower numbers tend to let the simulation drag on for longer.

Parameters for plate tectonics simulation
Once the OK button is clicked in the parameters window, the simulation begins.  The initial land mass is created, the world is split into plates, and movement begins.


Simulation GUI

Below are some examples of output.  Because the simulation works on a 2D basis and wraps vertically and horizontally, I think a centering feature to be applied upon completion would be useful. As you can see in the examples, the land masses in the end result are often wrapping across the edges; centering would make for more attractive maps.  They'd also be more realistic if the north polar region and south polar region didn't wrap.  :)  Centering accomplishes that in many cases.

I'm going to put in a bit more work to finish up the export - write now it does PNG and RAW images, and a raw elevation dump in floating point - but I also want JPEG support.  Also, I think the program needs a centering feature.  At that point I'll probably put it up on GitHub.  The original version of this simulation was originally a computer science student's thesis project back in 2012, and there's a paper on it. He released the code under an LGPL license and placed the source code on Source Forge.  All I've done really is provide a GUI that will work with Windows.

This simulation can produce some nice crude planet maps, but it is slow.  Tens of minutes may go by for completion using the 512x512 and only a single cycle.

Seed 44 with 1 cycle
Seed 44 with 2 cycles


Seed 45 with 1 cycle


No comments:

Post a Comment