Skip to contents

White noise on the nx x ny grid (Philox stream 0 of seed, row-major) is transformed, multiplied by the amplitude filter \(H(k) = \sqrt{P(|k|)}\) and transformed back; the real part is the field. The default spectrum is the power law \(P(|k|) = |k|^{-\beta}\) (Peitgen and Saupe 1988) with the zero frequency removed; any spectrum(k) of the radial frequency designs another filter. Identical to the Python arm.

Usage

PowerLawField(nx, ny, beta = 2, dx = 1, dy = 1, spectrum = NULL, seed = 1L)

Arguments

nx, ny

Grid size.

beta

Power-law exponent (ignored when spectrum is given).

dx, dy

Grid spacing.

spectrum

Optional function of the radial frequency.

seed

Philox seed.

Value

List with field (nx x ny matrix), filter, kx, ky.

References

Peitgen, H.-O. and Saupe, D. (eds) (1988). The Science of Fractal Images. Springer, New York.

Examples

sum(PowerLawField(8, 8, beta = 2, seed = 3)$field)
#> [1] 2.664535e-15