Tile Tectonics





About

This program is a basic plate tectonics simulator. You can generate a new planet with neat rectangular plates, and watch as those plates change shape through interactions resembling those found in real life. Try generating a map and clicking the 'Move and resolve' button a few times to see what happens!

How it works

When you generate a map, what you see is a grid of tiles. Tiles within a black outlined region belong to a single tectonic plate, and move together around the map. Plates that are green, yellow, or orange are continental, while plates that are blue, purple, or pink are oceanic. Note that the tile grid wraps around on itself, so tiles on the left edge share a border with tiles on the right edge, and tiles on the top row are next to those on the bottom row.

When you click the 'Move plates' button, every plate moves in a certain direction that is randomly selected when you generate the map. (This direction can change from round to round.) However, this will cause plates to overlap, creating a convergent boundary, which is indicated by the tiles in conflict turning red. It will also cause gaps to appear between plates, creating a divergent boundary, which is indicated by the empty tiles turning grey. In real life, there are no gaps between tectonic plates, so these conflicts and empty tiles need to be resolved.

Clicking the 'Resolve tiles' button will resolve these conflicts and empty tiles following a set of predictable rules. Tiles will try to join the neighboring plate with the most tiles around that tile. If there's a tie, tiles will check which plates are the most prominent in their neighboring tiles and join the smallest one, though tiles in conflict will preference continental plates over oceanic plates, while empty tiles will preference oceanic plates over continental plates. This is because oceanic plates tend to subduct under thicker continental plates when they converge, and oceanic plates tend to expand when they diverge through the process of seafloor spreading.

The standard way to interact with this program is alternate between clicking 'Move plates' and 'Resolve tiles' to see what happens in every round of the simulation. But you can speed up the process by clicking the 'Move and resolve' button, which will do both actions at once. Repeatedly clicking 'Move and resolve' will effectively animate the simulation, and the results can look quite cool. (Try to avoid clicking 'Move plates' multiple times in a row, as that can make things behave incorrectly.)

This simulation is in no way realistic, as the plates tend to reach an equilibrium after a while, which doesn't happen in real life. In addition, transform faults aren't modeled at all, and plates can easily disappear from the map. But it does show some of the basic interactions of plate tectonics.

Other notes

You can use map codes to save plate simulations for viewing again. A map code will be generated with each map, and will appear below it. The code starts with the first number and ends with the last letter. By clicking the 'Generate from map code' button and pasting in the code, a particular map can be simulated exactly the same as it was originally. The code consists of numbers for the width and height of the map in tiles, the number of columns and rows of plates, and the size of the tiles, followed by letters for the type of each plate (continental or oceanic), followed by letters for the sequence of directions each plate moves in. By changing these values, it's possible to create maps with custom sizes and movement patterns.

The source code for this program can be found here if you want to see how it works. Other coding projects of mine can be found here.