Hexagonal Grids of Points Over a Rectangular Region

**SQUARE_HEX_GRID**
is a dataset directory which
contains grids of points that
form a hexagonal array in the 2D square, or more general
2D regions.

For one set of routines, the hexagonal grid is defined in the unit square [0,1] x [0,1]. For a matching set of routines, the hexagonal grid is defined on a coordinate box [A,B] x [C,D]. Other datasets were generated by computing a hexagonal grid on a large rectangle, and then selecting those points which fall inside a smaller, general region.

All nodes of the grid lie on one of **LAYERS** horizontal lines.
The first of these lines is the X axis (for grids in the unit square)
or the line from (A,C) to (B,C), for grids in a coordinate box.
Each successive line is **HY** units higher.

On all the odd numbered lines, there are **NODES_PER_LAYER** points,
equally spaced from 0 to 1 or A to B, with a spacing of **HX**.

On the even numbered lines, there are **NODES_PER_LAYER**-1 points,
whose values are the midpoints of successive intervals on
an odd numbered line. (The grid is staggered).

In order to maintain the hexagonal structure, the following relationship
is required between **HX** and **HY**:

HY=HX* sqrt ( 3 ) / 2.

Here is an image of a hexagonal grid with **NODES_PER_ROW** = 21
and **LAYERS** = 24, and a total of **N** = 492 nodes.

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

SQUARE_HEX_GRID, a C++ library which computes a hexagonal array of grid points over the interior of a square in 2D.

You may copy grid files defined for the unit square [0,1] x [0,1]:

- hex_grid_01_1_1_1.txt.
- hex_grid_01_2_2_3.txt.
- hex_grid_01_3_3_8.txt.
- hex_grid_01_4_4_14.txt.
- hex_grid_01_5_5_23.txt.
- hex_grid_01_6_6_33.txt.
- hex_grid_01_7_7_46.txt.
- hex_grid_01_8_9_68.txt.
- hex_grid_01_9_10_85.txt.
- hex_grid_01_10_11_105.txt.
- hex_grid_01_11_12_126.txt.
- hex_grid_01_21_24_492.txt.
- hex_grid_01_41_47_1904.txt.
- hex_grid_01_81_93_7487.txt.
- hex_grid_01_101_101_11658.txt.

You may copy hexagonal grid files defined for general coordinate boxes. Many of the following are defined on [1,4] x [2,7]:

- hex_grid_1_1_1.txt.
- hex_grid_2_2_3.txt.
- hex_grid_3_4_10.txt.
- hex_grid_4_6_21.txt.
- hex_grid_5_8_36.txt.
- hex_grid_6_10_55.txt.
- hex_grid_7_12_78.txt.
- hex_grid_8_14_105.txt.
- hex_grid_9_16_136.txt.
- hex_grid_10_18_171.txt.
- hex_grid_10_19_181.txt.
- hex_grid_11_20_210.txt.
- hex_grid_21_39_800.txt.

You may copy grid files defined for over more general regions:

- p_1_40_46_1377.txt
- p_2_40_46_1156.txt
- p_3_40_46_1596.txt
- p_4_40_40_857.txt
- p_5_40_23_489.txt
- p_6_40_46_1212.txt
- p_7_40_18_459.txt
- p_8_40_24_388.txt
- p_9_40_46_1725.txt
- p_10_40_46_1817.txt
- p_11_40_46_1369.txt
- p_12_40_46_1633.txt
- p_13_40_46_279.txt
- p_14_40_56_769.txt

For grids defined on general regions, there are some PNG images available:

- p_1_40_46_1377.png
- p_2_40_46_1156.png
- p_3_40_46_1596.png
- p_4_40_40_857.png
- p_5_40_23_489.png
- p_6_40_46_1212.png
- p_7_40_18_459.png
- p_8_40_24_388.png
- p_9_40_46_1725.png
- p_10_40_46_1817.png
- p_11_40_46_1369.png
- p_12_40_46_1633.png
- p_13_40_46_279.png
- p_14_40_56_769.png

You can go up one level to the DATASETS directory.