Planet map generator

Planet map generator

Return to topic list

Fri Feb 15 18:28:26 2013   by   Torben
I have added a web tool for my planet map generator.

Return to the topic list and follow the link there.
Mon Feb 18 15:50:30 2013   by   Torben
I have added options for contour lines and adjusting the water level.  Lower values gives more water.
Thu Mar 7 16:11:48 2013   by   Torben
I have added an option for icosahedral maps.  This projects the planet on 20 triangles, using the gnonomic projection.

There is a very slight discontinuity along the edges of the triangles that I haven't been able to get rid of, but it is good enough for full-world maps.  Just don't zoom too much along the joins.

I have also added a colour called "Lefebvre", which was contributed by Olivier Lefebvre.  This uses fairly pale colours, so it is suitable for printing.  Olivier also pointed out a small error in the Mars colour map, which has been fixed and suggested a slightly darker dayside with daylight shading, which I have followed.
Thu Mar 14 20:53:51 2013   by   drow
very cool!  i'm glad to see your world generator online.
Tue May 21 18:41:47 2013   by   Nicholas Manuel
Is there a way to generate High Res Maps from .bat files? I'm doing this for a Warzone 2100 Campaign.
Thu Jun 6 18:20:49 2013   by   Torben
You can get any resolution you want (up to limits imposed by your computer) by using the offline version of the planet program.  There is a Windows executable of a slightly older version at  The main difference is that icosahedral maps are not supported in the old version.  If you want the newest version, you can compile it yourself from the sources found at the same link.
Fri Nov 22 23:41:51 2013   by   Alana Claudan
Is there anyway to show different biomes other than... Well, tundras and forests? Like deserts, or plains?
This is really cool, though! I love playing around with it. I use it to help me visualize a planet when I'm writing.
Mon Nov 25 11:32:51 2013   by   Torben
The colouration is a function of altitude and latitude only, so it is rather limited.  Deserts, plains and rivers would be cool to add, I agree, but not so simple given the way maps are generated.  I have made some experiments on adding colouring based on satellite images (such as, but without any convincing result.  If I get anything to work, I will post a notice here.
Fri Mar 28 05:38:44 2014   by   Ellen
Of online map generators I have seen, this gives the most realistic results. Very good!

Is there a good way to consistently convert a desired % surface water cover to a water line number?
Fri Mar 28 05:40:14 2014   by   Ellen
Also, for the offline version, is it possible to create our own custom color schemes, and how would that be done?
Fri Mar 28 15:42:30 2014   by   Torben
Starting with the colour schemes, it is possible to make your own.  The manual (Manual.txt) describes a simple text format for specifying a colour scheme as ranges of RGB values.  If you find a colour scheme that you want to share with others, you can send it to me, and I will add it to both the offline and online programs.

As for the water percentages, there is no exact measure, but a rough guideline is that each change of the water line number by 0.01 will change the water percentage by 5-15%.  This depends a lot on the details of the planet.  Note that using the Peters projection will output the water percentage under the map.
Fri Mar 28 17:34:43 2014   by   Ellen
Cool, thanks!
Thu Mar 19 18:22:03 2015   by   Davy

Thanks to an XKCD comic, I fell in love with the Waterman Projection map. I don't know what it would take to pull off, but I think it would be a beautiful addition to the Projections list.
Fri Mar 20 09:12:04 2015   by   Torben
I have no immediate plans to add the Waterman projection, as it is rather complex and, IMO, of limited utility.

Also, if you saw a "Malformed message file" message earlier, it was there because I had manually deleted a spam message from the file and in that process deleted a mandatory newline at the end of the file.  This is fixed now.
Tue May 12 21:20:02 2015   by   rek
I suggest changing the Square projection settings to automatically set height = width, otherwise the "square" produced has blank bands with a rectangular map. Based on the name, the desired result is Mercator with equal height and width (a map that fills the square). It was a bit frustrating trying to figure out why the square was 50% white space.
Wed May 13 09:24:09 2015   by   Torben
The name "square" is not based on the shape of the entire map, but on the fact that both latitudes and longitudes are shown equidistantly, so the map grid becomes a square grid.  It is a standard name for this projection, so I see no reason to change it.

As for Mercator, it does fill a square map, but not exactly: The Poles are  projected to infinite distance from the equator.

If you want to know more about the properties of the ma projections used by the generator, you can follow the link "Cartographical map projections" next to the menu.
Tue May 19 14:58:17 2015   by   Ron Vantreese
The Square projection sets the image dimensions to ...

Height = x - 1
Width = 2x - 1

Wed Jul 8 17:36:48 2015   by   Ron Vantreese
Have a question about planet generator (planet.c/exe)

Manual.txt says this:

With the -pf option a map must be given on standard input.
This map is 11 lines of 24 characters. The characters are:
  . : very strong preference for water (value=8)
  , : strong preference for water (value=4)
  : : preference for water (value=2)
  ; : weak preference for water (value=1)
  - : don't care (value=0)
  * : weak preference for land (value=1)
  o : preference for land (value=2)
  O : strong preference for land (value=4)
  @ : very strong preference for land (value=8)

I realized that the water values are negative... but then I see this in the code:

      switch (c) {
      case '.': cl0[i][j] = -8;
      case ',': cl0[i][j] = -4;
      case ':': cl0[i][j] = -2;
      case ';': cl0[i][j] = -1;
      case '-': cl0[i][j] = 0;
      case '*': cl0[i][j] = 1;
      case 'o': cl0[i][j] = 2;
      case 'O': cl0[i][j] = 4;
      case '@': cl0[i][j] = 16;
      default: printf("Wrong map symbol: %c\n",c);

The "@" is 16, not 8... or should it be 8?

And... yeah... been thinking of making a map editor.
Thu Jul 9 08:56:20 2015   by   Torben
Yes, the 16 in the code looks like an error.  I'll fix it when I get the time.
Thu Jul 9 16:46:33 2015   by   Ron Vantreese
Awesome! And I have a suggestion...

      while (1) {
        rseed += increment;
        r1 = rseed;
        r1 = rand2(r1,r1);
        r2 = rand2(r1,r1);
        r3 = rand2(r1,r2);
        r4 = rand2(r2,r3);

Perhaps can you do something like "while (best > somevalue) { ... }" ?? Or some other escape/quit/give-up strategy? I maybe like some kind of external signal.
Mon Jul 17 15:12:32 2017   by   CorinaMarie
The copy of planet.c I have shows a creation date of Tuesday, May 03, 2016, 2:49:50 PM. That has the same case '@': cl0[i][j] = 16; in it. So, just a gentle reminder if you have time to update that to 8.


Return to topic list

New message:
Posted by:

Type the values of the dice shown below:

Return to topic list