Jump to content
  • Advertisement
Sign in to follow this  
Sol Blue

Geometry Problem: Representing the Earth's surface

This topic is 3498 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've had the inclination for a long time to make a Civilization-style game set on a sphere or an ellipsoid instead of a tiled plane. I've done enough research to know that you can't regularly tile a sphere, though — I think the closest you can get is something like a Bucky ball, but that takes at least two different types of polygons. Instead of a discrete, tiled representation, therefore, I'm considering using a continuous system. For example, instead of such-and-such a unit being located on a particular tile, it's located at a point, and instead of being able to move three tiles per turn, it can move ten miles, and so on and so forth. Unfortunately, I don't know the necessary math yet, so I was hoping you could point me in the right direction. How does one represent such a surface mathematically? What kind of coordinate system is used? How do you represent an area on the surface — e.g., how do I store this-is-forest, this-is-grassland information? Thanks for any hints or answers!

Share this post


Link to post
Share on other sites
Advertisement
you could get related info from the geographical/earth sciences domain: i.e. terms like:

(1) http://en.wikipedia.org/wiki/Geographic_coordinate_system

and maybe things like:

Geographical Information Systems(GIS),
remote sensing(for extra info)

These may provide an idea of where you could start. Also: Tertiary course module outlines on these topics will stipulate pre-requisites (such as the necessary math knowledge). It depends exactly how much of what kind of info you can/want to use in your application or want to know about/use. e.g. For a game it may typically be unnecessary to use real data/systems (where something similar and simple that works would suffice) where as a realistic simulatior can end up being one of the most complex types of applications to develop.

Anyhow, maybe that gives you some ideas (especially (1) above?).

Share this post


Link to post
Share on other sites
To represent this surface, usually the spherical coordinate system is used: Link1 Link2

Defining areas on the sphere would be basically the same as you would do on a cartesian plane: choose a primitive to represent it - be it a "triangle" or a "quad" (I mean these in the sense of a spherical triangle) - then choose the latitute and longitude of the points that will define this pritimive. You'll have to be carefull though where the coordinates crosses the 2Pi boundary. In those places, you can misinterpret the results and make a 10 degree wide region become a 350 degree wide region

For the rendering, you will want to use some sort of tesselation, for example using an icosahedron or even mapping a grid to the sphere. Due to this, you can think about mapping "areas" of your game into the tesselated polygons, it'll make creating the map easier, I believe.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!