• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Understanding how to build a hexagonal grid.

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am looking to incorporate a hex grind into my latest project and have been looking at how they are created.

I have found information on how to define a hex via geometry and also found some nice example codes to create a hex grid but am having trouble cross referencing the two bits of information to understand how the geometry of a hexagon relates to the code to create a hex grid. Primarily this is due to the code examples having a fair few bells and whistles attached as in this nice (reasonably short) example



Which makes something similar to what i was looking at but i am having trouble picking through the chaff to get to the basic grid code that simply creates the hex and the grid.

Could someone point me in the direction of a hex grid example with a description of what each part is doing or maybe cut the chaff from this code so i am left with the basic code to create a hex and the hex grid so i can cross reference it better?

Thanks.


 
Bartender
Posts: 10775
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

wayne morton wrote:I am looking to incorporate a hex grid into my latest project and have been looking at how they are created.


First: before I even look at this, please use proper words.

In IT, the abbreviation 'hex' usually means "hexadecimal", which left me totally confused until I worked out that you've used it to mean "hexagonal".

Winston

BTW: I've also changed your subject line accordingly.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!