Questions tagged [hexagonal-tiles]

Tessellating tiles for use as 2d-histogram bins, game boards, etc.

Hexagonal tiles are tessellating hexagons placed adjacently to each other.

The use of this tag is fairly broad, encompassing statistics, computer science and game design.

234 questions
3
votes
2 answers

Even-only hexagonal grid generator for python

I'm trying to make an "even only" hex grid in Python. The expected output is [[(0,0), (2,0), (4,0), (6,0)], [(1,1), (3,1), (5,1), (7,1)], [(0,2), (2,2), (4,2), (6,2)], [(1,3), (3,3), (5,3), (7,3)]] I was tinkering with this: >>> [[(x,y) for x…
Michael
  • 8,362
  • 6
  • 61
  • 88
3
votes
1 answer

Hexagonal board for Android - how to do it?

Once again I started to experiment with Android things. I'm trying to create a small simple game, which uses a hexagonal board. I know the math behind the hexagonal calculations, but the problem is how to actually implement such board in Android? At…
zaplec
  • 1,681
  • 4
  • 23
  • 51
3
votes
3 answers

Drawing a hexagon

Using Firemonkey XE2 , I was able to use the TCube component to create a cubed map, But I am now wanting a hexagon map. There was no option for a 3d hexagon shape i could find. I figured you could create a THex similar to the TCube but I have not…
Glen Morse
  • 2,437
  • 8
  • 51
  • 102
3
votes
1 answer

C++ Connected Hexagons on a Tile

I have a problem where I need to represent hexagons on a tile by their centre (which I refer to as a node) in my graph. Given a tile of hexagons, how can I find if two hexagons x and y are connected? (source: domathtogether.com) The following…
user2406944
3
votes
1 answer

Counting rows and columns

I am drawing hexagons in a map. For some reason it will only create one row. I believe my loops are correct. If on glVertex3f(((sin(i/6.0*2*PI))/10)+RowOffset,((cos(i/6.0*2*pi))/10)+CollumnOffset,-2); i swap RowOffset and CollumnOffset then I get…
Glen Morse
  • 2,437
  • 8
  • 51
  • 102
3
votes
3 answers

Single div horizontal CSS hexagon button

I'd like to create a CSS button in the shape of a hexagon using a single div to keep the markup clean. I've been experimenting with before and after pseudo elements and can do it with the hexagon 'points' at top and bottom but would like to do it…
Mike Higginbottom
  • 523
  • 2
  • 5
  • 8
3
votes
2 answers

Generating a Hexagonal Lattice Using Spatstat

I'm analyzing the growth pattern of certain particles, and want to compare the point pattern with that of a perfectly hexagonal lattice with the same intensity (same number of points per unit of area). I've written a function that does this, but it…
MikeZ
  • 345
  • 1
  • 4
  • 15
3
votes
2 answers

WPF "hex grid" component

Jumping into the world of WPF custom controls, and was wondering what the best way to design a HexGrid control would be? Think your favorite table-top war game; or, equally likely, your favorite video game that steals the design from a proud…
Kevin Montrose
  • 22,191
  • 9
  • 88
  • 137
2
votes
0 answers

Distributing 3d points by value across a honeycomb hex grid

I'm looking for ways of interpolating a set of colors (3d values of r, g, b represented as [0-5] respectively) across a hexagonal honeycomb grid. My specific scenario is a set of terminal colors: 6x6x6 colors with white (5,5,5) being the center,…
achilles
  • 21
  • 1
2
votes
1 answer

Create hexagonal field with flat tiles with JavaFX

I want to create an hexagonal field with flat tiles in JavaFX. The following stackoverflow question allows to create a field with pointy tiles: Create hexagonal field with JavaFX This code example works perfectly with pointy tiles: import…
Hervé Girod
  • 465
  • 3
  • 12
2
votes
0 answers

Create non-overlapping Hexagons around point coordinates

I have to create non-overlapping, irregular, hexagons (voronoi hexagons) around coordinate points. i found some answers to similar problems on SO and other places but i did not manage to adapt those solutions. how to draw tilegram/hexagon map in…
D.J
  • 1,180
  • 1
  • 8
  • 17
2
votes
2 answers

Increasing drawing performance with a hexagon grid

I'm working on my very first openGL game, inspired by the game "Greed Corp" on the playstation network. It's a turn based strategy game that is based on a hex grid. Each hexagon tile has it's own height and texture. I'm currently drawing a hexagon…
Quint Stoffers
  • 790
  • 8
  • 23
2
votes
1 answer

How to Get Coordinates from Hex Map on Click in Unity

I'm making the board game known as Hex. When I click on a tile, it changes to either blue or yellow, but I need to also be able to know what the coordinates of that tile are. I can't use... rend.transform.position; ...because the the coordinates I…
Jon
  • 43
  • 1
  • 6
2
votes
1 answer

Hexbins are not showing on geo tile map D3.JS

I have a map I've created with d3-tile. I've added code to show hexbins gathered from the dataset based on longitude and latitude. But the hexbins are not showing. I've only found examples that plot plain cartesian data in hexbins, not latitude…
Tilou
  • 59
  • 6
2
votes
1 answer

Bokeh hexbin - find original indexes of each hexagon

I am using Bokeh 0.12.15 version, which generates a great hexbin plot. I wonder how can I easily find the indexes of the values of each hexagon? for example for the code below (https://docs.bokeh.org/en/latest/docs/gallery/hexbin.html): import numpy…