Jump to content
Wikipedia The Free Encyclopedia

Weierstrass–Mandelbrot function

From Wikipedia, the free encyclopedia
Multifractal function used in terrain modeling and simulation
Not to be confused with the Weierstrass function (continuous but nowhere differentiable) or the Mandelbrot set.
A fractal surface generated using the Weierstrass–Mandelbrot function rendered in Blender

The Weierstrass–Mandelbrot function (often abbreviated W-M function) is a generalization of the classical Weierstrass function, extended to higher dimensions to model natural fractal phenomena. It is frequently used in terrain generation, particularly in simulated environments for robotics and autonomous vehicle testing. Unlike its 1D counterpart, the W-M function in multiple dimensions displays directionality, anisotropy, and multifractality, making it suitable for simulations of physically realistic surfaces.[1]

Mathematical formulation

[edit ]

The most common definition of the W-M function is:

z ( x , y ) = A m = 1 M n = 1 n max γ ( D 3 ) n [ cos ( ϕ m , n ) cos { 2 π γ n x 2 + y 2 L cos ( arctan ( y x ) π m M ) + ϕ m , n } ] {\displaystyle z(x,y)=A\sum _{m=1}^{M}\sum _{n=1}^{n_{\text{max}}}\gamma ^{(D-3)n}\left[\cos(\phi _{m,n})-\cos \left\{2\pi \gamma ^{n}{\frac {\sqrt {x^{2}+y^{2}}}{L}}\cos \left(\arctan \left({\frac {y}{x}}\right)-{\frac {\pi m}{M}}\right)+\phi _{m,n}\right\}\right]} {\displaystyle z(x,y)=A\sum _{m=1}^{M}\sum _{n=1}^{n_{\text{max}}}\gamma ^{(D-3)n}\left[\cos(\phi _{m,n})-\cos \left\{2\pi \gamma ^{n}{\frac {\sqrt {x^{2}+y^{2}}}{L}}\cos \left(\arctan \left({\frac {y}{x}}\right)-{\frac {\pi m}{M}}\right)+\phi _{m,n}\right\}\right]}

where:

  • z ( x , y ) {\displaystyle z(x,y)} {\displaystyle z(x,y)} is the terrain height at the spatial coordinates ( x , y ) {\displaystyle (x,y)} {\displaystyle (x,y)},
  • ( x , y ) {\displaystyle (x,y)} {\displaystyle (x,y)} are the 2D spatial coordinates on the ground plane,
  • A = L ( G L ) D 2 ( ln ( γ ) M ) 1 / 2 {\displaystyle A=L\left({\frac {G}{L}}\right)^{D-2}\left({\frac {\ln(\gamma )}{M}}\right)^{1/2}} {\displaystyle A=L\left({\frac {G}{L}}\right)^{D-2}\left({\frac {\ln(\gamma )}{M}}\right)^{1/2}} is a normalization factor,
  • γ {\displaystyle \gamma } {\displaystyle \gamma } is the frequency scaling factor,
  • D {\displaystyle D} {\displaystyle D} is the fractal dimension,
  • ϕ m , n {\displaystyle \phi _{m,n}} {\displaystyle \phi _{m,n}} is a uniformly distributed random phase,
  • M {\displaystyle M} {\displaystyle M} is the number of angular directions,
  • n max {\displaystyle n_{\text{max}}} {\displaystyle n_{\text{max}}} is the maximum frequency index,
  • L {\displaystyle L} {\displaystyle L} is the sampling length,
  • G {\displaystyle G} {\displaystyle G} is the scaling coefficient.[2]
The Weierstrass-Mandelbrot function, top view

The W-M function generates statistically self-similar surfaces with control over roughness, orientation, and frequency distribution, making it ideal for modeling realistic and irregular topographies.

History

[edit ]

The Weierstrass–Mandelbrot function was first explicitly studied and named in a 1980 paper by Michael V. Berry and Z. V. Lewis, titled "On the Weierstrass–Mandelbrot Fractal Function."[3] This work was published in the Proceedings of the Royal Society and marked the initial introduction of the function as a fractal object with applications in physics and mathematics. Berry and Lewis provided computer-generated visualizations of the function, helping establish it as a useful model for fractal phenomena. The function extends the classical Weierstrass function, which was originally introduced in the late 19th century by Karl Weierstrass as an example of a continuous but nowhere differentiable function. The Weierstrass–Mandelbrot function builds on this foundation by incorporating multifractal and multidimensional characteristics, as further explored in subsequent studies such as those by Marcel Ausloos and D. H. Berman in 1985.[4] Since then, the function has been adopted in a range of fields, including terrain modeling, due to its ability to simulate realistic, self-similar rough surfaces.

Use in terrain generation

[edit ]

The Weierstrass–Mandelbrot function has found wide usage in procedural generation of digital terrains. Its multifractal nature allows the synthesis of realistic elevation maps for evaluating the performance of ground vehicles, particularly autonomous robots navigating rough or off-road environments.[2]

The function is especially useful for testing suspension, traction, and path planning modules of autonomous ground vehicles in computer simulations.

Implementation in Python / NumPy

[edit ]
importnumpyasnp
defweierstrass_mandelbrot_3d(x, y, D, G, L, gamma, M, n_max):
"""
 Compute the 3D Weierstrass–Mandelbrot function z(x, y).
 Parameters:
 x, y : 2D np.ndarrays
 Meshgrid arrays of spatial coordinates.
 D : float
 Fractal dimension (typically between 2 and 3).
 G : float
 Amplitude roughness coefficient.
 L : float
 Transverse width of the profile.
 gamma : float
 Frequency scaling factor (typically > 1).
 M : int
 Number of ridges (azimuthal angles).
 n_max : int
 Upper cutoff frequency index.
 Returns:
 z : 2D np.ndarray
 The height field generated by the WM function.
 """
 A = L * (G / L) ** (D - 2) * (np.log(gamma) / M) ** 0.5
 z = np.zeros_like(x)
 for m in range(1, M + 1):
 theta_m = np.arctan2(y, x) - np.pi * m / M
 phi_mn = np.random.uniform(0, 2 * np.pi, size=n_max + 1)
 for n in range(n_max + 1):
 gamma_n = gamma**n
 r = np.sqrt(x**2 + y**2)
 term = np.cos(phi_mn[n]) - np.cos(
 2 * np.pi * gamma_n * r / L * np.cos(theta_m) + phi_mn[n]
 )
 z += gamma ** ((D - 3) * n) * term
 return A * z

See also

[edit ]

References

[edit ]
  1. ^ Robert L. Jackson (2023). Fractal terrain generation for vehicle simulation. Academia.edu. [1]
  2. ^ a b Casey D. Majhor and Jeremy P. Bos. "Multifractal Terrain Generation for Evaluating Autonomous Off-Road Ground Vehicles." arXiv preprint arXiv:2501.02172 (2025). arXiv:2501.02172
  3. ^ Berry, Michael V.; Lewis, Z. V. (1980). "On the Weierstrass–Mandelbrot Fractal Function" (PDF). Proceedings of the Royal Society A. 370 (1743): 459–484. doi:10.1098/rspa.1980.0080.
  4. ^ Ausloos, Marcel; Berman, D. H. (1985). "A Multivariate Weierstrass–Mandelbrot Function". Proceedings of the Royal Society A. 400 (1819): 331–350. doi:10.1098/rspa.1985.0083.
[edit ]
Stub icon

This mathematics-related article is a stub. You can help Wikipedia by expanding it.

Stub icon

This physics-related article is a stub. You can help Wikipedia by expanding it.

AltStyle によって変換されたページ (->オリジナル) /