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
1
vote
1 answer

Is it possible to make a polygon bounding box?

(first off, just to be sure, a hexagon is a polygon with 6 points, think honey-comb or Civilisation 5) I'm making a game that uses a hexagonal grid, but I can't seem to get the bounding box right, Javas API only tells me about rectangular "BB"…
XistenZ
  • 309
  • 1
  • 4
  • 14
1
vote
0 answers

How to plot several lines plots inside each tile of a SOM?

I'm currently working on SOM vizualisations. This is a SOM map with codes plots generated by using kohonen package Shortly, each circle is a neuron and inside each neuron we plot all the variable in a spectra shape. This plot is obtain by…
Olorin.G
  • 37
  • 7
1
vote
1 answer

pan control for hextiles

I need to render a large number of hextiles on a canvas. I would like to make this such that I render only the tiles that are visible to the user and load additional hextiles as the user scrolls (using drag or arrow keys or a pan control). I've the…
Azeem
  • 185
  • 1
  • 14
1
vote
1 answer

Hexgrid in matplotlib showing unexpected colors

I have been trying to create a Game of Life clone on a hexagonal grid in Python. I have managed to use hexbin to display the results and update them regularly to create an animation. Each cell can only have values 0 or 1 and I am using the Greys…
DK2AX
  • 265
  • 5
  • 16
1
vote
0 answers

"ghost" of draggable honeycomb element

I created a grid with draggable honeycomb-shaped divs (with just css, no svg/img/canvas). I want them to be both draggable and dropable, so that if I drop one onto another, their content swaps. Vue.js handles it. The problem is: when I start to drag…
Stas Shepelev
  • 145
  • 1
  • 11
1
vote
3 answers

How to plot (x,y,z) coordinates in the shape of a hexagonal grid?

If for example, I have the following coordinates with corresponding colors which represent a hexagonal shaped grid of hexagons: coord = [[0,0,0],[0,1,-1],[-1,1,0],[-1,0,1],[0,-1,1],[1,-1,0],[1,0,-1]] colors =…
ishido
  • 4,065
  • 9
  • 32
  • 42
1
vote
0 answers

Heatmap with value instead of count on ggmap (contour & geom_hex)

For the visualization of my predictive models on electric vehicle charging demand I would like to create heatmaps showing the hotspots of charging demand across multiple cities. I would like to use two different types of heatmaps - contour heatmaps…
Jonathan
  • 148
  • 1
  • 10
1
vote
0 answers

Selecting Hexagons around a radius

I have a map made of hexagons. When a hexagon is clicked on which a troop resides, other hexagons around the clicked one should be highlighted based on the troop's range variable. I have tried quite a few methods on my own, but failed. I can't seem…
Deivis
  • 27
  • 3
1
vote
0 answers

How to divide 2D coordinates into hexagonal cells?

Given a set of x's (latitude) and y's (longitude), I would like to be able to assign (hash) them to their corresponding hexagonal cells, which would cover all points within that set. How would I go about doing that in Java or C? This is close to…
Xpl0
  • 75
  • 5
1
vote
0 answers

R package for hexagonal lattice tesselation of continental US

Does anyone know of an R package that will generate an optimal hexagonal cell lattice to tessellate the continental US? The package should allow the user-specification of a cell-size and it should return the area of the US that is covered by the…
Benjamin Levy
  • 333
  • 6
  • 19
1
vote
1 answer

Hexagonal tilling of hemi-sphere

I need to have hexagonal grid on a spherical surface. like shown here. Right now I am doing a hexagonal flattened grid. and the projecting it onto the surface of a hemisphere. Like here, But as you can see, the funny artifact is hexagons on the…
jkhadka
  • 2,443
  • 8
  • 34
  • 56
1
vote
2 answers

Basic hexbin with R?

I have results from a survey. I am trying to create a graphic displaying the relationship of two variables: "Q1" and "Q9.1". "Q1" is the independent and "Q9.1" is the dependent. Both variables have responses from like scale questions: -2,-1,0,1,2. A…
d-cubed
  • 1,034
  • 5
  • 30
  • 58
1
vote
1 answer

Calculate aspect ratio of a hexagonal playing field

I'm rendering a grid of flat-topped hex tiles onto a HTML5 canvas. Placement and picking work flawlessly. At all times, the whole grid should be visible. For this I calculate the minimum rectangle containing all hexagons completely and use its…
1
vote
1 answer

selecting nearby hexes around a hex

I'm trying to select all hexes in a given range. However I'm getting weird results while implement this code found on Amit Patel's page. var results = [] for each -N ≤ dx ≤ N: for each max(-N, -dx-N) ≤ dy ≤ min(N, -dx+N): var dz =…
Alexus
  • 1,887
  • 1
  • 23
  • 50
1
vote
0 answers

drawing a specific kind of outline

Not sure if this possible in three.js, but I'd like to draw similar outline as you can see on the picture below. Currently I'm using LineSegments, which is good, but I like the one used in "Sid Meier's Starships" better. Although I'm not really…
Alexus
  • 1,887
  • 1
  • 23
  • 50