Simulation of a three dimensional Correlated Random Walk

sim.crw.3d(nStep, rTurn, rLift, meanStep, start = c(0, 0, 0))

Arguments

nStep

the number of steps of the simulated trajectory

rTurn

the correlation on the turn angle

rLift

the correlation of the lift angle

meanStep

the mean step length

start

a vector of length 3 containing the coordinates of the start point of the trajectory

Value

A trajectory in the form of data.frame

Examples

sim.crw.3d(nStep = 10, rTurn = 0.9, rLift = 0.9, meanStep = 1, start = c(0, 0, 0))
#>               x        y            z
#> 1   0.000000000 0.000000  0.000000000
#> 2  -0.222501191 0.872941 -0.005878601
#> 3  -0.395234045 1.419346 -0.275244164
#> 4  -0.615090852 1.906452 -0.951503645
#> 5  -0.605444909 2.669084 -1.703377286
#> 6  -0.323262268 3.535961 -1.716424955
#> 7   0.009618136 4.632936 -1.626348096
#> 8  -0.281815111 5.609060 -1.924131721
#> 9  -0.488869019 6.470570 -1.896881535
#> 10 -0.255716901 7.348381 -1.979505663