fakeRivers: Generate fake river networks.

Description Usage Arguments Details Value Author(s) Examples

Description

Produce some wiggly lines that form a tree structure.

Usage

1
fakeRivers(n = 30, pts = cbind(runif(n), runif(n)))

Arguments

n

If this is the only argument, start with n points in a unit square.

pts

The points to use for initial seeds.

Details

Use the initial points to create Voronoi tiles. Wiggle the edges. Then use the distance between nodes as edge weight to create a minimum spanning tree. Return the edges of the tree.

Value

A list of 2-column matrix line segments.

Author(s)

Barry Rowlingson

Examples

1
2
3
4
rivers = fakeRivers()
## Not run: plot(c(0,1),c(0,1),type='n')
## Not run: lapply(rivers,lines)
  

fakeplace documentation built on May 2, 2019, 4:43 p.m.