This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Understanding how to build a hexagonal grid. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Understanding how to build a hexagonal grid." Watch "Understanding how to build a hexagonal grid." New topic
Author

Understanding how to build a hexagonal grid.

wayne morton
Greenhorn

Joined: May 17, 2012
Posts: 28
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.


Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7494
    
  18

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.


Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
 
Don't get me started about those stupid light bulbs.
 
subject: Understanding how to build a hexagonal grid.
 
Similar Threads
Drawing lines between JPanels/JInternalFrames
Is there anyway of overriding the default signal for PopupMenus
I want to insert Data into the pie chart.I have put the code to gernate the Pie
Can anybody help??
pie chart