orthoceros
Chieftain
- Joined
- Aug 14, 2007
- Messages
- 45
Thank you. We need to distinguish two different things:
First the easy one: If the "camera is close enough" at the sphere (like when you zoom in in Civ IV), the impression of the tiles you see becomes planar, but you do not see all tiles any more. This is the same effect, if you look out of the window: You may think the environment is flat, but the Earth is actually still spherical. Nothing needs to be unbend here.
Now the more difficult one: Unbending the spherical map to get a 2D planar map, where you can see all tiles, and all tiles having exactly the same shape again: This is also possible, but don't expect the result to be intuitive. If you start with the images from above, the following steps are necessary to achieve this:
However, if you have a kind of a minimap feature in your head, I would strongly suggest not to use the octahedron net for it. Instead do it like Google Earth: a usual 2D projection of the whole Earth and if you click in it, the camera flys to the corresponding location over the sphere.
First the easy one: If the "camera is close enough" at the sphere (like when you zoom in in Civ IV), the impression of the tiles you see becomes planar, but you do not see all tiles any more. This is the same effect, if you look out of the window: You may think the environment is flat, but the Earth is actually still spherical. Nothing needs to be unbend here.
Now the more difficult one: Unbending the spherical map to get a 2D planar map, where you can see all tiles, and all tiles having exactly the same shape again: This is also possible, but don't expect the result to be intuitive. If you start with the images from above, the following steps are necessary to achieve this:
- undo the deformation, which gives all tiles roughly the same area on the surface of the sphere
- undo the spherical projection
- You are now back at an octahedron shape. (Well, not exactly, but this is not relevant here...) Like the sphere, the octahedron is still borderless. The 2D representation will necessarily have borders. So:
- Slice the octahedron at some lines from vertex to vertex (the 6 vertices of the octahedron correspond to the locations, where the four overlapping hexagons meet).
- Now you can unbend the resulting polygon net easily to become two-dimensional. Actually, there are 11 ways to choose the slice lines and get a 2D net of the octahedron. One possibility is shown in the Wikipedia article linked above.
- Also note that always four triangle faces meet at each vertex of the net; this corresponds to the four overlapping hexagons.
- Of course, each triangle face of the octahedron net consists only of hexagons, the very same hexagons you see in each 270°-triangle on the sphere spanned by three locations with overlapping hexagons.
- Try to fold the 2D octahedron net pictured in Wikipedia to a 3D octahedron in your head. Then you will know, which borders of the 2D net correspond to each other (if a unit on the 2D map would move over such a border, it would be "beamed" to the corresponding border; this is what I meant with "unintuitive result").
However, if you have a kind of a minimap feature in your head, I would strongly suggest not to use the octahedron net for it. Instead do it like Google Earth: a usual 2D projection of the whole Earth and if you click in it, the camera flys to the corresponding location over the sphere.