PDA

View Full Version : building a 3d world globe



jumpjack
02-05-2009, 07:44 AM
I found these instruction on internet about which projections are needed to build a 3d earth globe:
"Create a series of 12 Transverse Mercator projections that are 32 degrees in longitude and 91 degrees in latitude to form a "flower petal" projection for making globes. If the northern hemisphere is being created, the latitude range is -1 to +90. If the southern hemisphere is being created, the latitude range is -90 to 1. The petals are formed by changing the center longitude and map rotation in steps of 30 degrees for each Transverse Mercator projection. Each section is put into the mosaic. The final center of the projection is a Lambert Azimuthal Equal-area centered on the pole and covers from -90 to -75 or 75 to 90 degrees latitude and 360 degrees in longitude. This is the last cube that is placed in the mosaic"

But I can't find suitable (free) programs to obtain needed projections!
Any help?

I need a Java or Windows program which any raster image input and produces raster output.

Steel General
02-05-2009, 07:54 AM
Does Google Earth do that kind of stuff?

bartmoss
02-05-2009, 07:57 AM
Nope google earth doesn't do anything like that.

Your easiest choice is to use a flattened dodecahedron (20-sided die) map, sort of like the maps traveller used, and then glue the sides together appropriately.

Either that, or just paint your map on a spherical object to begin with.

jumpjack
02-05-2009, 08:07 AM
Does Google Earth do that kind of stuff?

it just SHOWS a globe, I need to PRINT it to BUILD it. ;)

jumpjack
02-05-2009, 08:09 AM
Nope google earth doesn't do anything like that.

Your easiest choice is to use a flattened dodecahedron (20-sided die) map, sort of like the maps traveller used, and then glue the sides together appropriately.

Either that, or just paint your map on a spherical object to begin with.

no, I want to print one of these:
http://astrogeology.usgs.gov/Gallery/MapsAndGlobes/

But I want to be able to choose MY map and MY size.

Steel General
02-05-2009, 09:20 AM
it just SHOWS a globe, I need to PRINT it to BUILD it. ;)


Sorry I misread what you wanted to do :?

waldronate
02-05-2009, 12:31 PM
You can do a globe with many different kinds of projections. The idea is to get small enough pieces to cover the globe without too much distortion when you paste them down. For example, sinusoidal gores (optionally with azimuthal equidistant endcaps) work well.

I have used Fractal Terrains ( http://www.profantasy.com/products/ft.asp and Wilbur ( http://www.ridgenet.net/~jslayton/software.html ) to generate images for such projects in the past, but there are more modern programs out there such as G.Projector ( http://www.giss.nasa.gov/tools/gprojector/ ) or FlexProjector ( http://www.flexprojector.com/ ) that might be better suited for the task. G.Projector wants input in the equirectagular projection but that's doable (I have successfully used my elderly ReprojectImage program at http://www.ridgenet.net/~jslayton/ReprojectImage.zip for this task). I haven't done much more than just barely play with FlexProjector so I can't say how useful it would be in this context.

There were a few discussions here about making globes here a while back ( http://www.cartographersguild.com/showthread.php?t=2109 is one) so there is probably additional information drifting around.

Attached is an example of the old Forgotten Realms Interactive Atlas map reworked for cutout and paste to a globe. It was reprojected from its original Equirectangular projection to the one shown in one step in Fractal Terrains.

RobA
02-05-2009, 03:04 PM
I also responded in this thread:
http://www.cartographersguild.com/showthread.php?t=4216

Not sure if they are for the same thing or not. If OK, I would like to merge the threads.

-Rob A>

jumpjack
02-06-2009, 02:54 AM
Y
I have successfully used my elderly ReprojectImage program at http://www.ridgenet.net/~jslayton/ReprojectImage.zip for this task).


I played a bit with it, but I can't figure out how to produce a Lambert Azimutal Equal Area projection centered on north pole, can you please help?



There were a few discussions here about making globes here a while back ( http://www.cartographersguild.com/showthread.php?t=2109 is one) so there is probably additional information drifting around.

Thanks, I searched the forum a bit, but didn't find that thread.


@Roba:
yes, it's the same subject, I posted in different forums because I didn't know which one was the more suitable (i.e. which section usually is read by users knowing solution to my problem :) )

waldronate
02-06-2009, 03:24 AM
ReprojectImage takes an image in some projection other than Equirectangular and produces an image in the Equirectangular projection. This step is usually the hard one. You would then take that image and run it through a piece of software such as Wilbur or Fractal Terrains (I'm most familiar with those two as I wrote them).
In Wilbur you would reproject the Equirectangular image as follows:
1. Load the image using File>>Open with the Type set to Color Image Texture.
2. Set the map boundaries using Surface>>Map Info (Top=90, Left=-180, Right=180 and bottom=-90 for a whole-world image).
3. Reproject the map using Window>>Map Projection. Pick the desired projection (Lambert Azimuthal Equal-area in this case) from the drop list and drag the image in the window around to get the desired result. For world endcaps you will want a Center of Projection with Latitude=90 for the north pole and Latitude=-90 for the south pole.
4. Click Export BMP on the Map Projection window to save a bitmap of the desired resolution.

Below are examples of this process on a basic Earth map to get polar caps.

jumpjack
02-06-2009, 04:49 AM
R
Below are examples of this process on a basic Earth map to get polar caps.
Cool, looks like it's exactly what I need! :)
But I can't install Wilbur on my office PC, as the installer requires administrator privileges?!? :?:
Isn't any ZIP/portable version available?

edit:
...and I can't download Fractal Terrains as it appears as a "Game" site! :-(

waldronate
02-09-2009, 11:52 PM
Try installing directly from the msi file rather than the exe in the WIlbur setup - it might work better.

jumpjack
02-10-2009, 02:28 AM
Try installing directly from the msi file rather than the exe in the WIlbur setup - it might work better.
I found two better solutions:
- I waited till I went home and I installed Wilbur on my home PC :)
- I installed a virtual PC on office PC ;)

But now I have another difficulty: how do I know how large the saved image must be (proposed size is always 1024x1024) to "match" the sinusoidal projection which I used to obtain the petals?
Let's suppose the starting image is 640x320 size.

waldronate
02-10-2009, 03:23 AM
Pick any size that you want. It's the inches / degree at constant dpi when printing that's important, not the image size.

For an arbitrary ball, the length of a pole-to-equator sinusoidal gore will be (ball diameter * pi / 4). A common 10-inch playball give a 7.85 inch gore (10 * 3.1415927 / 4).

With a 10-inch ball, you need a sinusoidal gore that's 7.85 inches long pole to equator. If you are using an image that's 320 pixels high, then the pole-to-equator distance is half of that or 160 pixels. 160 pixels / 7.85 inches = 20.4 pixels/inch (very low resolution). To get an endcap that's 15 degrees radius and printed at the same ppi then you'll need an image that's 2/6 of the 160 pixels (15 degrees / 90 degrees = 1/6 radius * 2 = diameter) or 53.33 pixels) or 53 pixels.

For a more reasonable 2048 height image then you're looking at 130 ppi and 341 pixel endcaps.

jumpjack
02-10-2009, 08:10 AM
Pick any size that you want. It's the inches / degree at constant dpi when printing that's important, not the image size.

For an arbitrary ball, the length of a pole-to-equator sinusoidal gore will be (ball diameter * pi / 4)[...].
Thanks, I think now I got the point.
Given ball diameter D, I need a W x H map, where:
W=2*H
H=D*pi/2 (H/2 = C/4 = 2*pi*r/4 = D*pi/4)

Given this map, I need, for a Lambert projection 30 wide, an image WL wide, where:
WL=D*pi/12 (WL=C*30/360 = C/12 = 2*pi*r/12 = D*pi/12)

I hope it's correct.

RobA
02-10-2009, 09:13 AM
Here is an inspirational video for you:

http://videos.howstuffworks.com/science-channel/5058-how-its-made-globe-video.htm

-Rob A>

jumpjack
02-10-2009, 12:34 PM
Here is an inspirational video for you:

http://videos.howstuffworks.com/science-channel/5058-how-its-made-globe-video.htm

-Rob A>

thanks, very useful.
I need a rod. :)

winski
02-14-2015, 04:40 PM
If somebody is still looking for solution, I coded sinusoidal gores projection in javascript, and it is available here http://www.winski.net/?page_id=12 under BSD license (you can do whatever you want with the program and its source). It works in a web browser so you don't have to download anything.

jumpjack
07-28-2015, 09:24 AM
If somebody is still looking for solution, I coded sinusoidal gores projection in javascript, and it is available here http://www.winski.net/?page_id=12 under BSD license (you can do whatever you want with the program and its source). It works in a web browser so you don't have to download anything.
Looks promising from tablet, but I can't access it from Office PC as the site is "uncategorized"...:? Maybe you can add some keywords like "planets", "globes" or "cartography" in page header?

johnvanvliet
07-28-2015, 04:26 PM
if all you need is gores
netpbm already has this built into it and it has been for MANY years
this is a 6 year old thread after all

netpbm is a collection of image tools that is almost ALWAYS installed on every linux Operation system and most windows as part of the printing code



ppmglobe 6 map.ppm

http://1.t.imgbox.com/gQBgrV5V.jpg (http://imgbox.com/gQBgrV5V)

from the manual page
" man ppmglobe "


Ppmglobe User Manual(0)



NAME
ppmglobe - generate strips to glue onto a sphere


SYNOPSIS
ppmglobe [-background=colorname] [-closeok] stripcount [filename]

Minimum unique abbreviation of option is acceptable. You may use double hyphens instead of single
hyphen to denote options. You may use white space in place of the equals sign to separate an option
name from its value.



DESCRIPTION
This program is part of Netpbm(1)

ppmglobe does the inverse of a cylindrical projection of a sphere. Starting with a cylindrical projec-
tion, it produces an image you can cut up and glue onto a sphere to obtain the spherical image of which
it is the cylindrical projection.

What is a cylindrical projection? Imagine a map of the Earth on flat paper. There are lots of differ-
ent ways cartographers show the three dimensional information in such a two dimensional map. The cylin-
drical projection is one. You could make a cylindrical projection by tracing as folows: wrap a rectan-
gular sheet of paper around the globe, touching the globe at the Equator. For each point of color on
the globe, run a horizontal line from the axis of the globe through that point and out to the paper.
Mark the same color on the paper there. Lay the paper out flat and you have a cylindrical projection.

Here's where ppmglobe comes in: Pass the image on that paper through ppmglobe and what comes out the
other side looks something like this:

Example of map of the earth run through ppmglobe

You could cut out the strips and glue it onto a sphere and you'd have a copy of the original globe.

Note that cylindrical projections are not what you normally see as maps of the Earth. You're more
likely to see a Mercator projection. In the Mercator projection, the Earth gets stretched North-South
as well as East-West as you move away from the Equator. It was invented for use in navigation, because
you can draw straight compass courses on it, but is used today because it is pretty.

You can find maps of planets at maps.jpl.nasa.gov ⟨http://maps.jpl.nasa.gov⟩ .


PARAMETERS
stripcount is the number of strips ppmglobe is to generate in the output. More strips makes it easier
to fit onto a sphere (less stretching, tearing, and crumpling of paper), but makes you do more cutting
out of the strips.

The strips are all the same width. If the number of columns of pixels in the image doesn't evenly
divide by the number of strips, ppmglobe truncates the image on the right to create nothing but whole
strips. In the pathological case that there are fewer columns of pixels than the number of strips you
asked for, ppmglobe fails.

Before Netpbm 10.32 (February 2006), instead of truncating the image on the right, ppmglobe produces a
fractional strip on the right.

filename is the name of the input file. If you don't specify this, ppmglobe reads the image from Stan-
dard Input.



OPTIONS
-background=colorname
This specifies the color that goes between the strips.

Specify the color (color) as described for the argument of the ppm_parsecolor() library routine
⟨libppm.html#colorname⟩ .

The default is black.

This option was new in Netpbm 10.31 (December 2005). Before that, the background is always
black.


-closeok
This means it is OK if the background isn't exactly the color you specify. Sometimes, it is
impossible to represent a named color exactly because of the precision (i.e. maxval) of the
image's color space. If you specify -closeok and ppmglobe can't represent the color you name
exactly, it will use instead the closest color to it that is possible. If you don't specify
closeok, ppmglobe fails in that situation.

This option was new in Netpbm 10.31 (December 2005).

jumpjack
07-29-2015, 08:51 AM
Indeed I don't use Linux. :)

Anyway I have some issues using that page with tablet: a very large map of pluto (4K or 8K) is not accepted.
The maps which are accepted work... but I can't download the result, as I don't have a "right click" available on the tablet! And also "save page" is not available. Long-tap does not work.
So, no way to save the result.

I also tried running the script locally, but it lacks lot of dependencies, as I just saved the page; I'd need a zip package containing all the sources...

johnvanvliet
07-29-2015, 12:59 PM
from the netpbm sourceforge page
http://netpbm.sourceforge.net/

a windows version is here "NetPBM-10.68.1-win-14.11.01.zip"
https://onedrive.live.com/?cid=9E7DB242359A93F0&id=9E7DB242359A93F0!28283

and the user manual is here
http://netpbm.sourceforge.net/doc/

for Pluto

there is a 18630x9315 nasa early map of Pluto
http://photojournal.jpl.nasa.gov/catalog/PIA19858
this is a Black and White image

a 4096x2048 Color map of Pluto 12 gore image
http://6.t.imgbox.com/J1g2hlg1.jpg (http://imgbox.com/J1g2hlg1)

jumpjack
07-31-2015, 03:10 AM
Thanks, but I'm in trouble accessing the Win32 version (but I found official page for Win32 version (http://gnuwin32.sourceforge.net/packages/netpbm.htm)) and last image.

In the meantime, found an interesting document about globe building and related projections:
https://www.mapthematics.com/Downloads/Gores.pdf

jumpjack
07-31-2015, 04:42 AM
I experimented a bit with ppmglobe. Man page is wrong, syntas is NOT this on Windows system:
ppmglobe [-background=colorname] [-closeok] stripcount [filename]

Correct syntax is:
ppmglobe [-background=colorname] [-closeok] stripcount <inputfile.ppm >outputfile.ppm

ppm format can be obtained using IrfanView. ppmglobe APPARENTLY (according to MAN) only supports ppm, pgm, or pbm formats, but it actually also supports PNM format, and the package includes PNM converters.

So if you have a PNG image these are the steps:
pngtopnm image.png >image.pnm
ppmglobe 12 <image.pnm >gores.pnm
pnmtopng <gores.pnm >gores.png

But I think ppmglobe does not create the needed "bleeds" described in the cited pdf (https://www.mapthematics.com/Downloads/Gores.pdf), i.e. the gores are not overlapping so it could be a bit difficult to properly glue them.