The Hidden Elegance of Gradient Noise 0 ▲ (iterate think thoughts) 163 days ago · 10 min read1914 words · Tech · hide · Fediverse post Picture a full-screen canvas. Dark teal water, lit from somewhere below, with thousands of faint cyan filaments drifting and swirling across it. It's never the same, and it's always flowing. There isn't a shader or a particle simulation engine here. The whole thing is a couple hundred lines of arithmetic, and the engine driving every one of those filaments is the same function Ken Perlin wrote in 1985 to fake textures on a computer that couldn't draw them for real, which we know today as Perlin noise.I'll walk you through a moving-water visualization to illustrate what Perlin noise actually is, and how a single noise value can be used to steer thousands of particles into curving currents to create a flowing surface. The snippets use the Squint ClojureScript dialect, but the ideas are language-agnostic.What is Perlin noise?Naively using random values is the wrong approach for creating a natural-looking texture. Pure randomness at every pixel will produce boring static that's chaotic… Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town