Next job was to create elevations and continents. A good way to do that is by using tectonic plates.
So I went ahead and created tectonic plates. I selected 50 random tiles (I called them tectonic roots) that were not too close to each other. Then I started assigning tiles to the closest tectonic roots.
The result was great right away:

Now I just had to assign a random vector to each tectonic plate that represented the movement around the center of the planet.

(The arrow is the vector around which the plate moves). This vector though should start in the CENTER of the planet, not in the center of the tile. (I did it that way to visualize how *each *plate moved)
So take the arrow, move it to the center of the planet and then using the right hand rule you know how each plate moves.
Then the hard part begun. I had to find all the tiles that are in the border of the tectonic plates and find the pressure they has from the neighbor tectonic plates.
I had to work on my math for this one since you need to find the cross product of the vector of the plates movement with the vector pointing to the neighbor tile. Do this for all the border tiles and then add up the values you found for the final pressure. (I won’t go into depth for now since I will have to refresh my memory on the math I did. If anyone is interested I can check it though)
After calculating the pressure on the borders I knew if the plates were colliding, drifting apart or if they were quite stable.
Then I created elevation in the borders: (~ref plate tectonics)
-
Convergent boundaries (Colliding)
Oceanic vs Oceanic: Island Arc
Oceanic vs Continental: Oceanic Trench and Mountain Range
Continental vs Continental: Extensive Mountain Range -
Divergent boundaries (Drifting Apart)
Divergent boundaries usually create new crust in a lower elevation so that’s what I did. I took the elevation of the tectonic plates and subtracted a small number from those. -
Transform boundaries (Stable)
Finally in the case of stable boundaries I averaged out the elevations in the area and added some randomness.
Finally I just had to move the elevation from the borders inwards to the tectonic root (Scaling down mountains or trenches). That took a recursive function but wasn’t that hard to do. I then blurred the elevations a bit to remove hard lines.
Anything with elevation < 0 became an ocean and elevation > 0 became land.

Here you can see a mountain range and what I think are results of my “Oceanic Trench” and “Island Arc” interpretations.
In any case I was happy with the morphology that was generated. Here’s another planet:

Post any questions below! I will continue with the wind and heat patterns tomorrow if you guys are interested!