HEX_GRID
Hexagonal Grid Datasets


HEX_GRID is a dataset directory which contains 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.

Description of a hexagonal grid of points

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.

Licensing:

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

Related Data and Programs:

HEX_GRID, a C++ library which computes elements of a hexagonal grid dataset.

HEX_GRID_DATASET, a C++ program which creates a hexagonal grid dataset and writes it to a file.

HEX_GRID_TRIANGULATE, a FORTRAN90 program which computes points on a hexagonal grid inside a number of test regions.

TABLE, a file format which is used to store the data.

Datasets:

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

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

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

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

You can go up one level to the DATASETS directory.


Last revised on 31 August 2005.