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

Constructing a hexagonal heat-map with custom colors in each cell

I would like to generate a hexagonal lattice heat-map in which each cell represents a group. Likewise, each cell would be a hexagon with a unique color (fill, set by a column color in the data-frame) value, and a saturation (alpha) value…
JKO
  • 295
  • 1
  • 12
3
votes
1 answer

How to store vertices positions of a hexgrid in a 2D Array?

Im facing this issue. I want to create an hexgrid and be able to create in this fashion: //grid extents int numCols,numRows; for (int i=0; i
JJC
  • 31
  • 3
3
votes
1 answer

Export SpatialPolygonsDataFrame as geojson or topojson in R

I am trying to convert a geojson of London local authorities into a hex cartogram where each hexagon represents one local authority. It works in R but when I try to export the generated hexgrid as geojson or topojson I get the following error: Error…
console.log
  • 177
  • 2
  • 16
3
votes
2 answers

How do I recursively draw a hex map in opengl?

I'm new to GL and wanted to create a tiled map as a self tuorial. I want to create a small (maybe 7 hexes wide / tall) hex map. My first thought was to just create a method to draw one hex and then just translate the appropriate offset and place the…
ahodder
  • 11,353
  • 14
  • 71
  • 114
3
votes
0 answers

How to produce a shapefile from matplotlib plot?

I want to produce an hexagonal grid inside a polygon (representing a geographical aera) where I get to chose the color of each hexagon. What I did: draw the polygon in Qgis over a map create a point grid inside the polygon add points where I want a…
Borbag
  • 597
  • 4
  • 21
3
votes
1 answer

Polar coordinates of vertices of a hexagonal grid?

Is it possible to parameterize a hexagonal grid in polar plane? In other words, is it possible to find polar coordinates of the centers of every hexagon packed in a hexagonal grid? The central hexagon is marked by a blue circle, and its polar…
Ivan Z
  • 1,517
  • 1
  • 16
  • 25
3
votes
0 answers

organizing MANY hexagons

im creating a boardgame, with a hexagon shaped tilebased map. i used konva to create the hexagons/polygons. the way i went about it was to just create a variable for each polygon, but this ended up as a 1000+ lines of code (as the map has about 50…
j a
  • 41
  • 7
3
votes
1 answer

How can I "natively" store hexagonal grids in R?

If I want to save some square grid in R, that's easily done. Say, | | 0 | 1 | 2 | |----|------|-------|-------| | 0 | TRUE | TRUE | FALSE | | 1 | NA | FALSE | TRUE | | 2 | TRUE | TRUE | FALSE | is stored as cartesian…
maxheld
  • 3,963
  • 2
  • 32
  • 51
3
votes
2 answers

random points in a hexarea / shape

I have a simple hexagonal grid, where I'm selecting a group of hexagons, which will then be filled with some random points. Let me explain the exact procedure of generating the points: Using a list of hex coordinates I'm selecting hexagons. Group…
Alexus
  • 1,887
  • 1
  • 23
  • 50
3
votes
0 answers

How to reflect a point around a line in hexagonal coordinates

I have a hexagonal coordinate system as shown here: (If you'd like a better understanding of the coordinate system, I learned it from here) I would like to reflect points (hexagons) across given lines. In fact, the only lines I need to reflect…
Pro Q
  • 4,391
  • 4
  • 43
  • 92
3
votes
2 answers

outline around group of hexagons

I have a group of hexagons in my hexagonal grid, which I'd like outline with a border. This is how it looks like so far: desired output: I have stored all the cotrner points of each hexagon from that group. I suppose these points can be used to…
Alexus
  • 1,887
  • 1
  • 23
  • 50
3
votes
1 answer

Vertical Hex Grid: Get x rings of tiles surrounding a specific coordinate

Problem What I am trying to do is get x numbers of rings from a specified point, and store those rings in a List> where the inner list is a list of all the hexes in that ring and HexCoordinate is a structure defined…
killerrin
  • 3,367
  • 3
  • 13
  • 9
3
votes
1 answer

Unity: Texturing a Shoreline in a Hexgrid

I'm a beginner programmer and new to Unity. I'm currently practicing hexgrid building with Unity5. My current hexgrid consists of flat hexes, which have either a grassland or ocean 2D texture. (Current hexgrid) I'd like to have a sandy shoreline in…
EpicCheese
  • 35
  • 4
3
votes
2 answers

Binning data into a hexagonal grid in Google Maps

I'm trying to display geospatial data in a hexagonal grid on a Google Map. In order to do so, given a hexagon tile grid size X I need to be able to convert ({lat, lng}) coordinates into the ({lat, lng}) centers of the hexagon grid tiles that…
caitlin
  • 2,769
  • 4
  • 29
  • 65
3
votes
1 answer

Flat topped hexes hexagonal grid coordinates To Pixel Coordinates

I am using flat topped hexagonal grid (following the manual listed here http://www.redblobgames.com/grids/hexagons/). I need to convert my cube coordinates into pixel coordinates. I have read Hexagonal Grid Coordinates To Pixel Coordinates but the…
Abdel5
  • 1,112
  • 3
  • 16
  • 39