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
0
votes
0 answers

What's the proper way to get a hex tile position from any given position?

The following code shows the mouse hit position with a gray sphere; the yellow sphere shows the snapped hex position; as you can see it works well when close to center but the moment I get a bit far it stops…
Disco Fever
  • 147
  • 10
0
votes
1 answer

My hexagon highlight function creates an oval; not a circle: how might I fix it?

I have an issue with my JavaScript. I'm trying to write a highlight function which highlights a circle of hexagons around a clicked hexagon at a given radius. Initially, I was able to get it to do, first a cross, followed by a square, and now I've…
0
votes
0 answers

Hexagonal (pointy-topped) Grid

I found this code and the grid is made of flat-topped hexagons. I am trying to make them pointy-topped. http://www.csharphelper.com/howtos/howto_hexagonal_grid.html I have set the center of a hexagon by dividing by 2 its height and width, and…
0
votes
0 answers

Determination of rectilinear movement by means of analysis of hexagons H3

There is a task, it is necessary to determine rectilinear movement among the transmitted GPS coordinates (without any binding to roads, water bodies, etc.). I converted the received GPS coordinates into H3 hexes (the level does not matter, you can…
0
votes
1 answer

Merging hexagons in grid

I have a hexagon grid that I'm drawing with HTML canvas with different type values with corresponding colours. I want to combine the hexagons that neighbour other hexagons with the same type. This is my current function: drawGrid() { …
0
votes
0 answers

Plotting a static hexagonal topology using MiniSom with a color scheme

I'm using the MiniSom package to make a Self Organizing Map of my data, in one of their examples on GitHub they plot a nice static hexagonal topology visualising the distance between the neighbouring neurons using a color based on an array with…
Bas R
  • 175
  • 7
0
votes
2 answers

How would I draw hexagonal grid using H3 in Javascript?

I want to make a system where a user will be able to draw a hexagonal grid. The regions and their coordinates will be stored in Database. We are thinking to implement H3 libary for this. How will be the library help is in making H3 hexagons all over…
0
votes
1 answer

Bokeh: third dataset for coloring HexTiles?

I have a pandas Dataframe with 3D coordinates (longitude, latitude, altitude) and used hexbin(longitude, latitude, 0.0001) to create the source for hex_tile(). I looked at the tutorial where the fill_color is calculated as linear_cmap('counts',…
G Knucklez
  • 11
  • 2
0
votes
1 answer

How do I create a Hexagonal grid from country SpatialPolygon in R?

I would like to create a SpatialPolygons object (Hexagonal grid) that replace another SpatialPolygons. my attempt using the sp, sf and rgeos packages does not work, I get the error: Error in (function (classes, fdef, mtable) : unable to find an…
0
votes
0 answers

Terrain map with satellite texture and hex grid with deck.gl

I want to make a map with deck.gl (or alternatives, open for advice). It should be a terrain map with satellite images as textures and a colored hex grid overlay. Any hints on how to accomplish this? As I understand, it should be possible to combine…
Danijan
  • 31
  • 6
0
votes
0 answers

calculate overlap area between hexagon grids and polygon in R

everyone! I am studying species richness at grid-cell scales-hexagon grid. I want to calculate the overlap area between the hexagon grid and my studied polygon, because for some hex close to the border, most area were outside the polygon, so I want…
Tao Liang
  • 21
  • 1
0
votes
0 answers

Bfs game Map implementation in java

I'm trying to implement a bfs algorithm in Java,but it doesn't work as it should be. I've made a game map comprised of HexTile objects(custom objects,similar to matrix elements). Each HexTile includes one adjacency list containing references to the…
0
votes
2 answers

Calculate width of hexagons in a field

I am drawing a hexagonal grid using javascript and svg. The grid needs to have a fixed width (let's say, of 1000px). The dimensions of the grid can differ, but I have that information (the columns and rows). I have written a function that given a…
spassvogel
  • 3,479
  • 2
  • 18
  • 23
0
votes
1 answer

Generating a curved path on hexagon grid

I made my account just for this, as I have 0 clue where to start when tackling this problem. I have a grid of hexagons and I want to generate a path from point a to b right now I can generate a straight path which, but I wanted to know how you…
BaldFelix
  • 1
  • 1
0
votes
1 answer

Calculate the number of hexes between two hexes on a hex grid?

Using the hexgrid and coordinates above, I am trying to find a consistent formula to calculate the distance between two hexes.