diamond.dualcents {diamonds}R Documentation

Coordinates of centers of hexagons

Description

Creates x and y coordinates of center points of the hexagon duals of a diamond partition, suitable for points.

Usage

  diamond.dualcents (b, d)

Arguments

b list of coordinates of vertices of a diamond, as from diamond.base
d depth of recursion of partition; if d=1, then no partition

Details

Centers are generated for "left-side" hexagons, assuming that diamonds are joined as in octahedron or icosahedron. See reference.

Value

List with x and y components.

Author(s)

Denis White, white.denis@epa.gov

References

White, D., (2000) Global grids from recursive diamond subdivisions of the surface of an octahedron or icosahedron, Environmental Monitoring and Assessment, 64(1), 93-103.

Examples

  base <- diamond.base ()
  diamond.plot (diamond.edges (base, 1))
  lines (diamond.dualedges (base, 4), col="blue")
  points (diamond.dualcents (base, 4), pch=19, col="red")
  lines (diamond.edges (base, 1), lwd=2, col="black")
  title ("Centers of Dual Hexagons at Level 4", line=0)

[Package diamonds version 1.0-4 Index]