Skip to main content
gamedev.net
🔒 Locked

Spherical Coordinates?

Started by deltawing1 Jan 28, 2008 at 11:21 PM 0 replies 1.2k views
Original Post
deltawing1
deltawing1
Hi, I'm trying to make a simple simulation (while will later turn into a game). The simulation is to have an Earth floating in space, and with satellites orbiting it. My problem is that I need to dynamically generate political borders that wrap around the contour of the sphere. When I click on a country, that country should light up. (I'm not trying to the real political borders! that would be too complicated) I can do this with a flat cartesian system ... just write code to define the borders of particular countries. I'd make a Country class and inside the class I would define the border coordinates, then draw then onto a Canvas class on something. Can someone help me with the spherical model? I only need a few tips to get started, because I really am totally bogged down and out of ideas. Thanks!
Silver Phoenix
Silver Phoenix

Hello deltawing1.

I googled for sphere cube generation split and think that the first link may interest you.

There are plenty of ways to create a sphere, but I think that creating it from a octahedron gives you the best surface, because it is completely convex and you can use two square textures (or one rectangular) to define your map.

At the beginning, it also explains a little about spherical coordinates.

I don't know your math background, so the coordinate system may be a somewhat confusing/scarce from those articles.

Hope this helps. :)
My passive agressiveness can be so devastating. - Alanis Morissette, "Everything"

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.