0

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 changed the coordinates of the apexes accordingly. So I have a pointy-topped hexagon, but what should I do next? I need a sort of rotation. Columns to rows and rows to columns.

By pointy-topped, I mean

By pointy-topped, I mean

Rand Random
  • 7,300
  • 10
  • 40
  • 88
  • 1
    Please edit your question with a [Minimal, Reproducable Example](https://stackoverflow.com/help/minimal-reproducible-example) of what you've currently done. – Hayden Jun 13 '23 at 23:15
  • Your image doesn't show somtehing that would have "rows" and "columns" like your example page does. Shouldn't you be using a rotated version of that image if you're going to be using similar concepts? It seems to me that you'd just be changing a few bits of the logic (like calculating the height instead of the width, and adding 1/2 width for odd rows instead of 1/2 height for odd columns). You should label the hexagons in your image as (0,0), (0,1), (0,2) etc. as the example page did. – Rufus L Jun 14 '23 at 00:40
  • Maybe something like this is what you're looking for? https://dotnetfiddle.net/XrG4Fe – Rufus L Jun 14 '23 at 01:32

0 Answers0