r.surf.fractal(1grass)

πŸ’– r.surf.fractal β€” the GRASS manual, but make it cute ✨

okay bestie, so r.surf.fractal is a GRASS User's Manual page (we're in the 1grass era of life πŸŽ€) and it does exactly one iconic thing: it creates a fractal surface of a given fractal dimension. That's the whole plot. That's the NAME section. Periodt. πŸ‘‘

KEYWORDS: raster, surface, fractal 🌸


✨ SYNOPSIS ✨

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

🚩 Flags (the lil toggles, no values needed)

  • --overwrite β€” lets your output files just bowl right over any existing files like it's nothing. no survivors, bestie πŸ’…
  • --help β€” prints the usage summary, aka the "wait what does this even do" button
  • --verbose β€” verbose module output, the module will literally not stop talking
  • --quiet β€” quiet module output, the module is giving silent treatment 🫢
  • --ui β€” forces a GUI dialog to pop up. main character window energy ✨

πŸŽ€ Parameters

  • output=name [required] β€” the name for your output raster map. yes you HAVE to give it one, it's not optional, it's the bare minimum πŸ™ˆ
  • dimension=float β€” the fractal dimension of the surface, where 2 < D < 3. Default: 2.05
  • number=integer β€” how many intermediate images to produce. Default: 0
  • seed=integer β€” seed value for the random number generator. Using the same seed ensures identical results, while a randomly generated seed produces different outcomes in each run. so like, same seed = same fate, random seed = chaotic new timeline 🌈

πŸ’œ DESCRIPTION πŸ’œ

r.surf.fractal creates a fractal surface of a given fractal dimension. iconic behavior honestly.

It uses the spectral synthesis method β€” that's the technique, that's the flex 🧚

It can also create intermediate layers showing the build up of different spectral coefficients. (If you want an example of this, go look at Saupe, pp.106-107. trust, it's giving textbook.)

This module generates naturally looking synthetical elevation models (DEM). yes babe, fake terrain that looks real. the illusion?? ate. πŸ”₯


⚠️ NOTE ⚠️

This module requires the FFTW library for computing Discrete Fourier Transforms. no FFTW, no fractal, it's that simple bestie 😭


🌸 EXAMPLE 🌸

okay so first up: generate a surface using fractals in a selected region, set the color table, and display it 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 πŸ¦‹

Then 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)

πŸ“š 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

(the whole surf fam, go say hi πŸ’–)


πŸ‘‘ AUTHOR πŸ‘‘

Jo Wood, Midlands Regional Research Laboratory (ASSIST), University of Leicester. absolute legend, we thank her πŸ’


🧚 SOURCE CODE 🧚

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

Latest change: Wednesday Feb 04 09:35:39 2026 in commit: 951c345cdf558c719d1ee1c4806f942283a875d1

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

Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual


and that's the whole page bestie, no notes πŸ’…

okay bye ily, this was r.surf.fractal(1grass) from the GRASS 8.5.0 reference manual, see u next time 🌈🫢✨

πŸ“¦ where this page comes from