voss2d: Fractal Brownian function on 2D grid with a classic Voss algorithm
Description
voss2d() function generates realizations of a fractal Brownian fFunction on uniform 2D grid (FBF(x,y)) with a classic version of the Voss algorithm (random sequential additions).
Usage
voss2d(g=7, H=0.5, r=0.5, center=TRUE)
Arguments
g
a number of iteration.
H
a Hurst parameter: (0<H)&(H<1).
r
a partition coefficient for iteration segments.
center
logical; if center=TRUE then the y-coordinates of prefractal points will be centered.
Value
A list of Cartesian coordinates of prefractal points.
Details
The Voss algorithm on 2D grid is based on an iterative partitioning of the initial domain into smaller subdomains by bilinear interpolation of additional points.
At each iteration, all values of the fractal Brownian function get normal pseudorandom additions with zero mean and standard deviation, which depends on the iteration index i.
In the classical version of the Voss algorithm standard deviation is exponentially distributed by iteration: s[i] <- s0*r^(i*H), where the initial value s0 <- H*log(1/r).
References
Shitov V.V. and Moskalev P.V. (2005) Modification of the Voss algorithm for simulation of the internal structure of a porous medium, Technical Physics, Vol.50, No.2, pp.141-145, doi:10.1134/1.1866426.
# NOT RUN {set.seed(20120522)
voss <- voss2d()
image(voss, xlab="x", ylab="y",
main="FBF(x,y) with a parameter H=0.5")
contour(voss, levels=0, add=TRUE)
# }