seed: Generate random seeds.

Description Usage Arguments Value References See Also Examples

Description

Generate a random seed whose DNA will shape its development upon germination.

Usage

1
2
seed(n, max.depth, min.trunk.height = 10, max.trunk.height = 30,
  min.branch.length = 3, max.branch.length = 10)

Arguments

n

A measure of branchiness. How many terminal branches will this seed produce?

max.depth

How deep will the hierarchy of branches be? In the wild, trees never have more than 25 tiers of branches, nor less than 3, so please observe that law of nature.

min.trunk.height

How short might the trunk be?

max.trunk.height

How tall might the trunk be?

min.branch.length

How short might each segment be?

max.branch.length

How long might each branch segment be?

Value

a seed object containing branches and lengths, and suitable for input to germinate.

References

Random sampling of branch tips uses an approach described by Stack Overflow user @BrodieG (Brodie Gaslam) posted here and available as a Gist here.

See Also

germinate

Examples

1
2
3
4
s <- seed(50, 10, min.branch.length=0, max.branch.length=5, 
         min.trunk.height=5, max.trunk.height=8)
         
head(s)

johnbaums/trees documentation built on May 19, 2019, 3:03 p.m.