Description Usage Arguments References Examples
This function runs the Modified Fast Marching Method of Silva and Steele (2012,2014) on a gridded domain.
1 | gridFastMarch(domain, seeds, spatial.res = 1, verbose = T)
|
domain |
Grid (matrix) of chosen dimension with diffusivity values for every grid cell. Values above 1 will boost diffusivity, below 1 will inhibit it. Values of 0 should mark cells that block diffusion. |
seeds |
A (4 x n) array containing the x-coordinate, y-coordinate, incept time and rate-of-spread for each of the n seeds. |
spatial.res |
(Optional) Spatial resolution of the grid, necessary only to correct the rate-of-spread unit. See example below. Defaults to 1. |
verbose |
(Optional) Boolean to control verbose output. |
Sethian, J.A. (1996), A fast marching level set method for monotonically advancing fronts, Proc. Natl. Acad. Sci. 93 (4), 1591-1595.
Silva, F. and Steele, J. (2012), Modeling Boundaries Between Converging Fronts in Prehistory, Advances in Complex Systems, 15(1-2), 1150005, <doi:10.1142/S0219525911003293>
Silva, F. and Steele, J. (2014), New methods for reconstructing geographical effects on dispersal rates and routes from large-scale radiocarbon databases, Journal of Archaeological Science 52, 609-620, <doi:10.1016/j.jas.2014.04.021>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | # Single process
grid <- matrix(1,10,10)
seed <- c(5,5,0,1)
fm <- gridFastMarch(grid, seed, verbose=FALSE)
image(fm$arrival.time)
# Two processes with same incept time
seeds <- cbind(c(7,7,0,1),c(2,2,0,1))
fm2 <- gridFastMarch(grid, seeds, verbose=FALSE)
par(mfrow=c(1,3))
image(fm2$process, main='process')
image(fm2$arrival.time, main='arrival time')
image(fm2$cost.distance, main='distance')
# Same as before but changing spatial.res parameter
fm3 <- gridFastMarch(grid, seeds, spatial.res=10, verbose=FALSE)
# Same as before but with a barrier in middle
grid[5,2:9] <- 0
fm4 <- gridFastMarch(grid, seeds, spatial.res=10, verbose=FALSE)
par(mfrow=c(1,3))
image(fm4$process, main='process')
image(fm4$arrival.time, main='arrival time')
image(fm4$cost.distance, main='distance')
# Same as before but with different incept times and speeds
seeds <- cbind(c(7,7,0,1),c(2,2,1,0.5))
fm5 <- gridFastMarch(grid, seeds, spatial.res=10, verbose=FALSE)
par(mfrow=c(1,3))
image(fm5$process, main='process')
image(fm5$arrival.time, main='arrival time')
image(fm5$cost.distance, main='distance')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.