Nature of Code: Chapter 0
A random walker is like a drunk pixel stumbling around a grid. At every step it moves one unit in a random direction, producing unpredictable—yet often surprisingly coherent—paths over time. Written in Rust with macroquad.
This variant replaces pure randomness with Perlin noise. Instead of following a random unit vector, the walker’s x and y coordinates come directly from a noise field, yielding smoother, more organic motion. Written in Rust with macroquad.
A one-dimensional view of Perlin noise. The sketch stacks four octaves of fractal Brownian motion (fBm) and scrolls through a horizontal slice of the data, producing a graph reminiscent of a stock ticker—or any time-series signal. Written in Rust with macroquad.
Two-dimensional Perlin noise can generate rich textures. This demo renders animated “clouds” by sampling a 2-D fBm field. Written in Rust with macroquad.
Similar to the "clouds" above, this terrain is generated with 2-D perlin noise. Mapping the perlin values to the height of the vertices in a flat mesh produces a seemingly infinite landscape.