diamond.randwalk {diamonds}R Documentation

Coordinates of hierarchical random walk

Description

Creates x and y coordinates of paths connecting centers, in random hierarchical order, of a diamond partition, suitable for lines.

Usage

  diamond.randwalk (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

The walk connects diamonds in the partition in the order of the labels generated by diamond.labels, except that, at each hierarchical level, the four elements are randomly permuted.

Value

List with x and y components.

Author(s)

Denis White, white.denis@epa.gov

See Also

diamond.randlabels, diamond.hierwalk

Examples

  base <- diamond.base ()
  diamond.plot (diamond.edges (base, 1))
  points (diamond.centers (base, 4), pch=19, col="red")
  lines (diamond.randwalk (base, 4), lwd=1, col="blue")
  lines (diamond.edges (base, 1), lwd=2, col="black")
  title ("Hierarchical Random Walk at Level 4", line=0)

[Package diamonds version 1.0-4 Index]