Continents on a Sphere

Managed to get most of the continent mask generation code ported to work on the surface of a sphere. The general process is the same as what was posted previously for Continent Mask. The differences are that the algorithms must be performed in three dimensions. The nearest neighbor searching for the Voronoi distance diagram was being generated through a KDTree so no real changes needed to be make this work. The hexes are uniformly spaced so a euclidean distance metric can still be used. Even though a spherical distance calculation would be more accurate it takes longer to compute and the result is the same given the input geometry. The noise algorithms have no issues being calculated in three dimensions instead of two. The part that needed the most changes was the line drawing across the hexes. Drawing lines in a two dimensional array was done using the Bresenham line drawing algorithm. To draw a line across the hexes on a sphere a breadth first search is done where the next hex to process is determined by a choosing the one with the shortest euclidean distance to the target. The same result can be achieved using A* but it takes much longer and is unnecessary in this case because the weight for the edge are all the same. Continents on a Sphere:
Still need to convert more code to use the graph before I can make the other steps work on a sphere. The next thing to do will be to write the code for subgraph extraction to be able to process pieces of the sphere such as a land mass or body of water independently. The continent masks on the sphere currently do not eliminate inland water which is necessary for the process of drainage basin generation that I am using.

One Comment

  1. Galen Velky says:

    I have a little secret to share. I came across a web page (actually I was invited) and it offers a secret way to get unlimited income and traffic to affiliate links without the need for a website, or practically anything else. There is a piece of software that takes the pain out of making money online. The software was created by a guy who became fed up with all of the usual money making methods that online marketers typically use. Obviously, this is a tactic that has never been seen before. Don’t let the simplicity fool you. This software is powerful enough that it can generate 4 figure incomes. You’ll want to get in on this as soon as you can so go ahead and check out the info and watch the video ->

Leave a Reply