r.surf.fractal(1)

✨ r.surf.fractal ✨

okay bestie, welcome to the GRASS GIS User's Manual page for r.surf.fractal(1) β€” yes that's the manual name, yes it's giving very official, and yes we're gonna make it cute. πŸ’…


πŸŽ€ NAME πŸŽ€

r.surf.fractal β€” creates a fractal surface of a given fractal dimension. that's it, that's the whole job, and it ate. πŸ”₯


🌸 KEYWORDS 🌸

raster, surface, fractal


πŸ¦‹ SYNOPSIS πŸ¦‹

r.surf.fractal
r.surf.fractal --help
r.surf.fractal output=name  [dimension=float]   [number=integer]
[--overwrite]  [--help]  [--verbose]  [--quiet]  [--ui]

🫢 Flags:

  • --overwrite β€” allow output files to overwrite existing files (yes, it will just bulldoze the old one, so be sure bestie πŸ’€)
  • --help β€” print usage summary
  • --verbose β€” verbose module output
  • --quiet β€” quiet module output
  • --ui β€” force launching GUI dialog

🌈 Parameters:

  • output=name [required] β€” name for output raster map. you gotta name your baby, no skipping this one.
  • dimension=float β€” fractal dimension of surface (2 < D < 3). Default: 2.05
  • number=integer β€” number of intermediate images to produce. Default: 0

πŸ’– DESCRIPTION πŸ’–

so r.surf.fractal creates a fractal surface of a given fractal dimension. the way it does this is by using the spectral synthesis method. and here's the fun part β€” the module can also create intermediate layers showing the build up of different spectral coefficients (peep Saupe, pp.106-107 if you want an example of that, iykyk).

this module generates naturally looking synthetical elevation models (DEM). no cap, they look real. πŸ‘‘


⭐ NOTE ⭐

this module requires the FFTW library for computing Discrete Fourier Transforms. no FFTW, no fractal, that's the vibe check. 😭

🧚 EXAMPLE 🧚

generate surface using fractals in selected region, set color table and display with shade.

g.region -p raster=elevation
r.surf.fractal output=fractals
r.colors map=fractals color=byr
r.relief input=fractals output=fractals_shade
d.mon wx0
d.shade shade=fractals_shade color=fractals b=50

artificial surface created with fractals ✨

compare results when using different fractal dimensions:

# D=2.0005
g.region -dp
r.surf.fractal out=dem_d2_0005 dim=2.0005
r.info -r dem_d2_0005
r.mapcalc "dem_d2_0005_final = 1.0 * dem_d2_0005 + abs(min(dem_d2_0005))"
r.colors dem_d2_0005_final color=terrain
r.slope.aspect dem_d2_0005_final aspect=dem_d2_0005_final_as
# D=2.90
r.surf.fractal out=dem_d2_90 dim=2.90
r.info -r dem_d2_90
r.mapcalc "dem_d2_90_final = 1.0 * dem_d2_90 + abs(min(dem_d2_90))"
r.colors dem_d2_90_final color=terrain
r.slope.aspect dem_d2_90_final aspect=dem_d2_90_final_as

artificial DEMs created with fractals:

  • top: fractal dimension d=2.0005 (left: elevation map, right: aspect map)
  • top: fractal dimension d=2.90 (left: elevation map, right: aspect map)

(yes bestie, both of them say "top" in the original, i'm just the messenger πŸ™ˆ)


πŸ’œ REFERENCES πŸ’œ

Saupe, D. (1988) Algorithms for random fractals, in Barnsley M., Devaney R., Mandelbrot B., Peitgen, H-O., Saupe D., and Voss R. (1988) The Science of Fractal Images, Ch. 2, pp.71-136. London: Springer-Verlag.


πŸ‘‘ SEE ALSO πŸ‘‘

r.surf.contour, r.surf.idw, r.surf.gauss, r.surf.random, v.surf.idw, v.surf.rst


πŸ“ AUTHOR πŸ“

Jo Wood, Midlands Regional Research Laboratory (ASSIST), University of Leicester


πŸ’€ SOURCE CODE πŸ’€

available at: r.surf.fractal source code (history)

accessed: Saturday Jan 17 05:41:02 2026

Main index | Raster index | Topics index | Keywords index | Graphical index | Full index


Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual

and that's a wrap bestie!! πŸŽ€ this page lives in GRASS 8.4.2, it's r.surf.fractal(1), and honestly? iconic. go make some fractals, you got this. πŸ¦‹πŸ’–βœ¨

πŸ“¦ where this page comes from