Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


Equal distribution of points on the surface of a sphere


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Remos   Members   -  Reputation: 129

Like
0Likes
Like

Posted 30 July 2014 - 09:53 AM

I would like to make an interactive sphere that has "pixels" as smallest divisible map units. By "pixels" I mean like the provinces of Rome Total War or like the hexes in Civ games. But not so important and detailed. They would just contain absolute basic information about the area they cover (coordinates; terrain; population; adjecensies; infrastructure level; etc)

 

How would I go about generating a sphere which is covered by those "pixels"? Is such a thing even possible?



Sponsor:

#2 Erik Rufelt   Crossbones+   -  Reputation: 3507

Like
1Likes
Like

Posted 30 July 2014 - 11:12 AM

You can repeatedly subdivide an http://en.wikipedia.org/wiki/Icosahedron to get a sphere covered in equally sized triangles. Something like the following http://en.wikipedia.org/wiki/Geodesic_grid



#3 Heff E   Members   -  Reputation: 449

Like
0Likes
Like

Posted 30 July 2014 - 01:13 PM

There are a few different ways to tile a sphere, and you'd have to decide which one of them suits your purpose.

 

One of the more natural tilings is the geodesic grid that Erik linked above, as it creates the familiar hexagon tiles.

(A few of them are pentagons, due to the geometry of the icosahedron)

As you're comparing to the tiles in civ I'd guess that this is the closest to what  you're looking for.

 

If you want more flexibility in how your regions / tiles are shaped you could easily skip generating the dual for the subdivided sphere

and simply create your own groups of triangles to form regions, to achieve something more like the total war regions.

 

 

Aside from the above, I've also tried just projecting a tiled cube to a sphere, which is easy and gives these wonky-styled tiles.

With proper resolution on the grid this also works well for customized regions, without the same scale of jagged edges you'd get from the triangles in an icosphere.


// Heff




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS