Learn R Programming

FieldSim (version 2.1)

midpoint: Fractional Brownian field simulation by the midpoint displacement method

Description

The function midpoint yields discretization of sample path of a fractional Brownian field by the midpoint displacement method.

Usage

midpoint(H,nblevel=8)

Arguments

H
a real in ]0,1[. H is the Hurst parameter of the fractional Brownian field to simulate.
nblevel
a positive integer. $\code{nblevel}$ is the level associated with the regular space discretization of the following form: $[[0:2^{\code{nblevel}}]/2^{\code{nblevel}}]^2$.

Value

  • A list with the following components:
  • Zrowthe vector of length $2^{\code{nblevel}}+1$ containing the discretization of the x axis.
  • Zcolthe vector of length $2^{\code{nblevel}}+1$ containing the discretization of the y axis.
  • Zthe matrix of size $(2^{\code{nblevel}}+1)$x$(2^{\code{nblevel}}+1)$ in such a way Z[i,j] containing the value of the process at point (Zrow[i],Zcol[j])
  • timethe CPU time

encoding

latin1

Details

The subspace [0,1] x [0,1] is discretized in a regular space discretization of size $(2^{\code{nblevel}}+1)^2$. At each point of the grid, the fractional Brownian field is simulated using the midpoint displacement method described for example in Fournier et al. (1982).

References

A. Fournier, D. Fussel and L. Carpenter (1982). Computer rendering of stochastic models. Communication of the AMC *25*, 371-384. H.O. Peitgen and D. Saupe (1998). The science of fractal images. Springer Verlag. R.F. Voss (1985). Random fractal forgeries. NATO ASI Series *F17*, 805-835.

See Also

quadvar,fieldsim

Examples

Run this code
# load FieldSim library
library(FieldSim)

# Simulation
# H=0.3
res <- midpoint(H=0.3,nblevel=8)
# Plot
x <- res$Zrow
y <- res$Zcol
z <- res$Z
persp(x, y, z, theta = 30, phi = 30, expand = 0.5, col = "lightblue")

Run the code above in your browser using DataLab