# Distance Fields for Shapes **Track:** 3D, Shaders & AI Intuition — Creative Coding — the existing 50 **Framework / surface:** GLSL **Level:** Advanced **Prerequisites:** Fragment Shaders & UV Space, The Coordinate System **In one line:** Draw in a shader by measuring — colour each pixel by distance to a shape. ## Theory, aesthetics & inspiration A signed distance field asks, for every pixel, a single question: how far to the nearest surface? Color, shadow, and shape all follow from that scalar answer, and surfaces become implicit — defined by an equation rather than a list of vertices. Inigo Quilez ("iq") is the form's great expositor, whose Shadertoy experiments and articles on raymarching and smooth-minimum blending showed how spheres, boxes, and tori can be melted together in a few lines of math. The aesthetic is one of fluid, weightless geometry: shapes that interpenetrate and morph without seams, an austere beauty in which the entire scene is reconstructed from distance alone.