Description Usage Arguments Value See Also Examples
This function takes parameters such as the number of tiles, the proportion of
final tiles that are holes and merged, control parameters for choosing random
points. It calls random point processes to create a point patter,
generates a Voronoi diagram based on the results,
modifies the diagram as necessary and outputs a landscape object.
pHole
and pMerge
can be set to any value in [0, 1), but larger values
in this range will increase the runtime and are not recommended in general. The number
of points picked is scaled up based on pHole
and pMerge
values so that the
number of tiles in the landscape is very close to (usually equal to) sum(n)
.
The control
list can include any or all of the following elements:
lattice
, a vector of length 2 containing the number of horizontal and
vertical grid lines that lattice points are to be chosen from.
cluster
, a vector of length 2 specifying the number of points per cluster
and the cluster spread (standard deviation of a bivariate Gaussian)
ssi
, a single numeric, the inhibition distance for the SSI method.
The makePoints
function has defaults for any control parameters not specified.
1 2 |
n |
a vector of the numbers of points to pick with each method: uniform, lattice, cluster, and SSI, respectively. If the vector is of length less than 4 it will be filled out with zeroes. |
hAsp |
numeric, the horizontal to vertical aspect ratio of the landscape. |
pMerge |
numeric between 0 and 1, the proportion of tiles in the landscape that have been merged with another tile. In practice, pMerge should be less than 0.5 or so. See 'Details'. |
pHole |
numeric between 0 and 1, the proportion of tiles in the final landscape that are deleted to become holes. In practie, pHole should be less than 0.5 or so. See 'Details'. |
plot |
boolean to indicate whether or not a plot is automatically produced. If you save the object returned, you can plot it later. |
control |
a list of control parameters passed to the |
filename |
a character string giving the prefix file name to be attached to saved output.
Can include a file path. If |
debug |
Run in debugging mode? (Uses browser().) |
... |
Additional arguments will be passed to the plot call if appropriate. |
A landscape
object.
1 2 3 4 5 6 7 8 | myLand <- rlandscape()
myLand$stats
## Not run:
plot(myLand)
myComplicatedLand <- rlandscape(n = c(20, 80, 40, 10), hAsp = 2, pMerge = 0.3,
plot = TRUE, control = list(lattice = c(15, 15), ssi = 0.05))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.