hexagrid-class | R Documentation |
The hexagrid
function constrcucts a hexa-pentagonal grid based on the inversion of a
tessellated icosahedron.
tessellation |
( |
deg |
( |
sp |
( |
graph |
( |
radius |
( |
center |
( |
verbose |
( |
Inherits from the trigrid
class.
The grid structure functions as a frame for data graining, plotting and
calculations. Data can be stored in layers that are linked to the grid object. In the current version only the
facelayer
class is implemented which allows the user to render data to the cells
of the grid which are called faces.
The grid 'user interface' is made up of four primary tables: the @vertices
table for the coordinates of the vertices,
the faceCenters
for the coordinates of the centers of faces,
the faces
and the edges
tables that contain which vertices form which faces and edges respectively.
In these tables, the faces and vertices are sorted to form spirals that go from the north pole in a counter-clockwise
direction. In case grid subsetting is performed these tables get truncated.
At finer resolutions, the large number of spatial elements render all calculations very resource demanding and slow,
therefore the hierarchical structure created during the tessellation procedure is retained for efficient implementations.
These data are stored in a list in the slot @skeleton
and are 0-indexed integer tables for Rccp-based functions. $v
stores vertex, $f
the edge, and $e
contains the edge data for plotting and calculations. In these tables
the original hierarchy based orderings of the units are retained, during subsetting, additional vectors are used to indicate
deactivation of these units. Any sort of meddling with the @skeleton object will lead to unexpected behavior.
A hexagonal grid object, with class hexagrid
.
vertices
Matrix of the vertex coordinates.
faces
Matrix of the verticies forming the faces
edges
Matrix of the vertices forming the edges.
tessellation
Contains the tessellation vector.
orientation
Contains the grid orientation in xyz 3d space, values in radian.
center
The xyz coordinates of the grid's origin/center.
div
Contains the number of faces that a single face of the previous tessellation level is decomposed to.
faceCenters
Contains the xyz coordinates of the centers of the faces on the surface of the sphere.
g <- hexagrid(c(8), sf=TRUE)
# based on approximate size (4 degrees edge length)
g1 <- hexagrid(deg=4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.