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

creating tiles using bufferedImage in java

public static BufferedImage split(BufferedImage img) { BufferedImage pic = new BufferedImage(img.getWidth(), img.getHeight(), BufferedImage.TYPE_INT_RGB); Graphics g = pic.getGraphics(); int width = 2000/2; int height = 2000/2; …
john
  • 3
  • 4
0
votes
2 answers

Hexagon Unity TIles - Slow Performance

When implementing a large hexagonal grid (256x256) of tiles in a Unity game, the game becomes very slow and hardly able to function. The hexagons are in a prefab. A script controls the size of the grid and the spacing between each hexagon. How does…
nate6631
  • 1
  • 4
0
votes
1 answer

Algorithm for coloring a hexagon tile map with minimum distance (3) for reoccurring colors

I need to create a hex-tile map, using at most 19 colors, where each color must keep a distance of at least 3 tiles. However, I do not need to use all 19 colors. If there exists an algorithm that solves this distance constraint with less than 19…
benjist
  • 2,740
  • 3
  • 31
  • 58
0
votes
1 answer

Optimal way to create hexagon buttons in a hex grid

I'm working on a tool that generates a grid of hexagons that the user can click on to cycle through certain states (Enemy, ally etc). So far, I've been able to generate the hexes as Polygons. I'm fairly new to Windows programming and the Win32 API.…
inzombiak
  • 171
  • 2
  • 14
0
votes
1 answer

Using hex binning for downsampling QQ plots

My datasets are pretty large and rendering generated QQ plots is slow and sometimes even freezes my browser. I know that one option that I have is simply to downsample the data vector. However, I wanted to try hex binning technique instead of…
Aleksandr Blekh
  • 2,462
  • 4
  • 32
  • 64
0
votes
0 answers

spiraling hexagonal grid in python

I want to create a hexagonal grid using XYZ coordinates that is constructed in a spiraling pattern. This is my current code, which produces a grid depicted by the red arrows below. My problem area is circled. Rather than going from [-1,0,1] to…
Benjamin James
  • 941
  • 1
  • 9
  • 24
0
votes
2 answers

CGContext is not drawing my shape

I'm trying to draw a hexagon in a UIView. I do this by overriding the drawRect method in my subclass of UIView. But when the view is shown I only see the backgroundColor of the view but I don't see my shape being drawn in it. This is the code in my…
wvp
  • 1,134
  • 5
  • 15
  • 28
0
votes
1 answer

only the first cloned object in hierarchy gets changes? Unity3D C#

This is a problem i have been working on for days, i haven't been able to find questions on here or the unity forums that can help, could anybody help? I have code in unity 3D C# that takes a hexagon prefab and clones it into a grid. But with my…
McGlovin
  • 43
  • 1
  • 8
0
votes
1 answer

Select pixels in a hexagon around a center point

I would like to implement a simple function into my code to get an list of pixel coordinates which are in a (hypothetical) hexagon of a certain size around a center point (x,y or also linear RGBA byte array, but I can convert later). Maybe there's a…
0
votes
1 answer

What is the equation to get camera angle from height of isometric hex grid?

Here is part of my formula to draw a hex. What is the equation to figure out what angle the camera would be at? If hex_squish is 1 then the hexes are perfect hexes and the camera would be at 90 degrees. If hex_squish is 0 then the camera would be…
Dan
  • 592
  • 1
  • 8
  • 20
0
votes
2 answers

How to make honeycomb version of perlin noise?

I wish to: Make regular 2d perlin noise constrain into a quantized, straight line version of itself, where the straight lines are 60° Maybe i can quantize the input of the perlin noise function to be on the 3 60° axes? Perhaps i could rewrite 2d…
bandybabboon
  • 2,210
  • 1
  • 23
  • 33
0
votes
1 answer

R, ggplot2 and a world map with points un hexagone cell

I have a data frame like X date lon lat 1 1 2014-01-08 23:50:13 -116.576504 53.93327 2 2 2014-01-08 23:35:50 NA NA 3 3 2014-01-08 23:06:33 NA NA 4 4 2014-01-08 23:06:07 -76.670200…
delaye
  • 1,357
  • 27
  • 45
0
votes
0 answers

varying stat_binhex() size in ggplot2

I'm trying to use the stat_binhex() in ggplot2 to drop hex tiles on a plot, and the automatic settings vary the color of the bins, depending on count. That is, all the hexes are the same size, but have different colors. I want to vary the size of…
0
votes
2 answers

On a hexagonal grid: selecting tiles within a given radius of a selection point.

I'm developing a simple 2D board game using hexagonal tile maps, I've read several articles (including the gamedev one's, which are linked every time there's a question on hexagonal tiles) on how to draw hexes on the screen and how to manage the…
user2189473
  • 13
  • 1
  • 3
0
votes
2 answers

Tracing the edge of a hexagon pixel by pixel

To create an animation in Javascript using an HTML5 canvas I first need to be able to describe a point by point path around a hexagonal shape. I already have the x/y coordinate of each vertex. I don't know which direction I will be travelling around…
1 2 3
15
16