Introduction
In the dimly lit halls of a demoparty in 2026, a 64-kilobyte executable unfolds into an infinite cosmos of swirling nebulae and crystalline structures that never repeat. No textures were loaded from disk; every pixel emerged from code. This is procedural graphics generation, the backbone of creative coding and the demoscene since the 1980s. Rather than relying on pre-rendered assets, artists and programmers define rules that produce visual complexity at runtime. Techniques such as Perlin noise, Worley noise, L-systems, fractals, and cellular automata allow creators to generate terrains, organic forms, particle fields, and abstract art with mathematical precision and surprising variety.
The demoscene’s relentless size constraints and real-time demands have driven decades of innovation. Ken Perlin’s 1983 noise function, refined in his 2002 improved version, became essential for natural-looking surfaces in intros and standalone works. Steven Worley’s 1996 cellular noise added Voronoi-like patterns that power everything from rock surfaces to abstract cityscapes. Meanwhile, Aristid Lindenmayer’s 1968 L-systems gave birth to algorithmic plants, and John Conway’s 1970 Game of Life demonstrated how simple cellular rules could birth gliders and oscillators. In 2026, these methods continue to evolve within GLSL shaders, p5.js sketches, and GPU-accelerated frameworks. This guide examines the core techniques, provides concrete implementation examples, and offers practical pathways for newcomers and seasoned demosceners alike to master procedural graphics.

Fractals and the Beauty of Self-Similarity
Fractals remain the most direct expression of mathematical art in procedural graphics. The Mandelbrot set, popularized by Benoit Mandelbrot in 1980, still appears in demoscene productions because its boundary contains infinite detail. A simple escape-time algorithm in GLSL can render a zoomable Mandelbrot in under 30 lines. Modern variants such as the Buddhabrot or Multibrot extend the aesthetic by accumulating iteration paths or raising the exponent.
Julia sets offer complementary dynamics. By varying the constant parameter across animation frames, demosceners create morphing fractal landscapes that sync to music. In 2024’s “Fractal Horizons” 4k intro by Still, a hybrid CPU-GPU pipeline combined distance-estimated 3D fractals with ray marching to achieve 60 fps at 4K. The key lies in the iteration count and bailout radius; increasing iterations from 128 to 512 reveals finer filaments but demands optimized early-exit logic.
Beyond escape-time fractals, iterated function systems (IFS) generate flame-like or crystal structures. The classic Barnsley fern uses four affine transformations chosen probabilistically. In creative coding environments such as Processing 4.3, a 200-line sketch can animate thousands of IFS points per frame using OpenGL point sprites. For demoscene size limits, these algorithms compress extremely well because the entire image is encoded in a handful of matrix coefficients.
Most procedural graphics are implemented as shaders — our shader programming guide covers the GLSL foundations.
Mastering Noise: Perlin and Worley Functions
Perlin noise, introduced by Ken Perlin in 1983 and improved with simplex noise in 2001, produces continuous, band-limited randomness ideal for terrain and organic textures. The improved version reduces directional artifacts by using a simplex grid. In Shadertoy (2026 edition), a common implementation layers multiple octaves with varying frequencies and amplitudes, a technique called fractional Brownian motion (fBm). A typical GLSL snippet sums five octaves with lacunarity 2.0 and persistence 0.5, yielding convincing mountain ridges when fed into a normal-map calculation.
Worley noise, published by Steven Worley in 1996, computes distances to the nearest random feature points, producing cellular patterns. The first and second nearest distances can be combined to create cracked-earth or pebble effects. Modern GPU implementations precompute a 3D grid of feature points in a texture and sample it with Manhattan or Euclidean metrics. In the 2025 Revision demoparty winning 64k intro “Cell,” Worley noise drove both surface displacement and a particle sorting system that created emergent Voronoi diagrams on the fly.
Combining both noises multiplies visual interest. Many demosceners use Perlin for low-frequency warping of Worley cells, producing marble or wood grain. Tools such as Houdini 20.5 and TouchDesigner 2026 allow rapid prototyping of these hybrids before porting the final expression to GLSL for size-optimized intros.
L-Systems: Algorithmic Botany and Architecture
L-systems, developed by Aristid Lindenmayer in 1968, model growth through parallel string rewriting. A simple axiom “F” with production rule “F → F[+F]F[-F]” generates branching structures after several iterations. Turtle graphics interpret the resulting string: F moves forward, + and - rotate. In p5.js 1.9, a recursive implementation with a stack for branch states renders convincing trees at 120 fps.
Demoscene applications extend beyond plants. The 2023 “Lumen” 4k intro used an L-system to generate Gothic cathedral floor plans that then extruded into 3D geometry via signed distance fields. Parameterizing the angle and length reduction per iteration allows the same grammar to produce both delicate ferns and massive urban layouts. Memory constraints in 64k intros force clever encoding; instead of storing the expanded string, the production rules are evaluated on the GPU using compute shaders that emit line segments directly into a vertex buffer.
Stochastic L-systems add randomness to rule selection, increasing variety without extra code size. When combined with Perlin noise to modulate branch thickness, the results approach photorealistic foliage while remaining fully procedural.
Cellular Automata: Emergent Patterns from Simple Rules
JavaScript and p5.js let you explore procedural graphics without a GPU — see our creative coding tools for procedural art for accessible starting points.
John Conway’s Game of Life, published in 1970, remains the archetypal cellular automaton. Each cell’s next state depends on its eight neighbors according to four rules. In creative coding, the algorithm runs efficiently on the GPU via double-buffered textures in GLSL. The 2026 demoscene production “Glider Gun” synchronized Life patterns to electronic music, with gliders triggering particle emitters at exact beats.
Beyond Life, reaction-diffusion systems such as Gray-Scott produce organic spot and stripe patterns. A two-chemical simulation updated with simple Euler integration yields Turing patterns useful for camouflage or abstract backgrounds. In Processing 4.3, a 512×512 grid updates at 200 fps using optimized arrays; the same simulation ported to a fragment shader runs at 4K resolution on modern GPUs.
Elementary cellular automata, particularly Rule 110 and Rule 90, generate complex one-dimensional patterns that can be extruded into 3D history volumes. These have appeared in several recent 64k intros because the entire evolution can be computed from a single seed row using bitwise operations, keeping executable size minimal.
Mathematical Art and Contemporary Demoscene Practice
Mathematical art merges the above techniques into cohesive visuals. In 2026, Shadertoy remains the primary sharing platform, with over 150,000 public shaders. Many demosceners prototype in Shadertoy before extracting reusable noise and fractal functions into their intros. TouchDesigner and vvvv gamma serve live-performance contexts, allowing real-time parameter tweaking during club sets.
Procedural systems require careful architectural thinking — CodeYourWeb’s article on algorithmic code architecture patterns provides useful structural patterns for generative systems.
Hybrid pipelines are now standard. A typical 4k intro might generate a heightfield with fBm, displace it using Worley cells, then instance L-system trees whose positions derive from a cellular automaton simulation. The final image is ray-marched or rasterized with custom deferred lighting, all within the 4096-byte budget after Crinkler compression.

Practical Tips / Getting Started
Begin with p5.js or Processing 4.3 for immediate visual feedback without complex build systems. Implement classic Perlin noise from scratch before relying on built-in functions; the exercise reveals how fade curves and gradient vectors affect final appearance. Move to GLSL once comfortable with 2D patterns. Study size-optimized intros on Pouet.net, disassembling small 64k productions with tools such as IDA or Ghidra to see how noise functions are inlined and constants folded. Participate in monthly Shader Showdown events at demoparties to iterate rapidly under time pressure. Finally, version-control every experiment; the best procedural systems evolve through hundreds of small parameter tweaks rather than single grand designs.
FAQ
How do I reduce the visual repetition common in basic noise implementations?
Layer multiple octaves with non-integer frequency ratios and rotate each layer’s gradient vectors by irrational angles. Adding a low-frequency domain warp from a second noise source breaks grid alignment effectively.
Rendering procedural geometry in real time demands the real-time rendering techniques covered in our rendering guide.
Which noise function is better for generating realistic rock surfaces, Perlin or Worley?
Worley excels at sharp facets and cracks; Perlin provides smoother underlying displacement. Most productions combine both, using Worley for high-frequency detail over a Perlin base.
Can L-systems run in real time inside a 64-kilobyte intro?
Yes. Evaluate the grammar iteratively on the GPU and emit geometry directly into a transform-feedback buffer, avoiding any CPU-side string expansion.
How does Conway’s Game of Life fit into a music-synchronized demo?
Treat stable patterns and gliders as triggers. Pre-compute a timeline of cell births that align with BPM markers, then drive particle emission or color shifts from those events.
What is the recommended learning path for someone new to demoscene procedural graphics in 2026?
Start with p5.js sketches of single techniques, port successful results to Shadertoy, then study 64k intro source code released after parties. Join the Discord communities around Revision and Deadline for feedback on size-optimization passes.
