diamond.base {diamonds}R Documentation

Create a base diamond

Description

Generates vertices of a portrait format diamond with center at (x, y) and short axis d.

Usage

  diamond.base (x=0, y=0, a=1)

Arguments

x x coordinate of diamond center
y y coordinate of diamond center
a length of short axis of diamond

Details

This function is normally called first to establish a base diamond from which recursive partitions are derived. The partitions are created from 4-fold subdivision into 4^(d-1) congruent sub-diamonds.

A "diamond" in this package means the figure formed by two equilateral triangles connected across a common edge, or, two adjacent faces of an octahedron or icosahedron.

Recursion in this package limits the useful size of problem. A version with C routines is in development.

Value

A list with four components, each a pair of (x, y) coordinates describing a vertex of the diamond.

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.edges (base, 4))

  # kites for levels 2-4
  diamond.plot (diamond.edges (base, 1))
  lines (diamond.edges (base, 4), lwd=1, col="blue")
  lines (diamond.triedges (base, 4), lwd=1, col="blue")
  lines (diamond.dualedges (base, 4), lwd=1, col="blue")
  lines (diamond.edges (base, 3), lwd=2, col="green")
  lines (diamond.triedges (base, 3), lwd=2, col="green")
  lines (diamond.dualedges (base, 3), lwd=2, col="green")
  lines (diamond.edges (base, 2), lwd=3, col="red")
  lines (diamond.triedges (base, 2), lwd=3, col="red")
  lines (diamond.dualedges (base, 2), lwd=3, col="red")
  lines (diamond.edges (base, 1), lwd=2, col="black")
  title ("'Kites' for Levels 2-4", line=0)

[Package diamonds version 1.0-4 Index]