(def octaves 4)
(def lacunarity 2.00)
(def persistence 0.50)
(def period 100)
(def height 40)
(plane y (fbm octaves :f lacunarity :gain persistence perlin p.xz period * height)
# try s/color/shade on the line below
| color (ss p.y -20 0 blue (ss p.y 0 20 green white))
| slow (20 / height)
| intersect (sphere 200))
(Using the terms from the article.) You can right-click and drag those numbers to see how the parameters affect the result in realtime. Also an easy way to compare perlin and simplex noise. Procedural terrain is fun! (color r2 (vec3
(fbm 8 :f (fn [q] (rotate (q * 2) (pi * sin (t / 100)) + [t 0]))
(fn [q] (cos q.x + sin q.y /)) q (osc t 30 30 10) | remap+)))
Basically taking the function (1 / (cos(x) + sin(y))) and adding it to itself 8 times, each time scaling and rotating the input a little more (:f).
This is a very very barebones version of this, but it’s not too hard to construct environment tables dynamically