diamond.randpts {diamonds}R Documentation

Coordinates of random points

Description

Creates x and y coordinates of random points in each diamond element of a diamond partition, suitable for points.

Usage

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

Value

List with x and y components.

Author(s)

Denis White, white.denis@epa.gov

Examples

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

[Package diamonds version 1.0-4 Index]