Thursday, May 24, 2012

Tectonic Youth

I've been working on a somewhat reasonable-looking plate tectonics simulation.

Looking for something along these lines, I had found an open-sourced VB app called World Builder, which uses David Allen's cdrift (around halfway down) algorithms for simulating something like continental drift on a toroidal topology; I believe that was influenced by Mark Isaak's plates.c (same as last link) program.

From my very rudimentary understanding of geology, it seems like the major disparity between how these simulations played out and what an Earthlike planet should look is purely geometrical: continents that split up and move around a torus are going to run into each other in different ways than on a sphere, and continents tend to break up along 120-degree angles.

So I basically implemented cdrift's general approach (build up continents' leading edges, erode to neighboring tiles, and split and merge plates at random), but on a sphere broken up into approximately evenly-sized tiles (latitudes spaced evenly, and as many squarish tiles as fit in each latitude). The results aren't terrible (same simulation state in three different projections):

 

It's slow as hell (maybe ~2s a step on my computer), because math is hard, though there are surely opportunities for optimization.

2 comments:

dr said...

Those four big islandy things going from temperate to tropical zones are going to create some interesting race relations.

tps12 said...

I built an extremely robust speech code into the initial conditions, so hopefully that should not be a problem.