Construct geometry and repeating patterns (fractals) using signed distance functions (sdf).
Fractals > Signed Distance Function (SDF) Fractals
Lots of things around SDF functions and fractals, there are the key things we'll talk about about here:
1. What are SDF Functions?
2. Simple SDF (WebGL/GLSF) Example (Sphere)
3. 'Flat' Fractal (2D)
4. 3D Shapes (Solid Sphere, Hollow-Sphere, Shell, ...)
5. Adding function (create more complex shapes)
6. Multiple shapes (hard way vs smart way)
7. Multiple operations to build fractals
8. Scene full of fractals
9. Limitations, challenges (soft fractals without details)
What are 'Signed Distance Functions' (SDFs)?
A signed distance function is a mathematical concept used in computer graphics to describe the distance from a point in space to the closest surface of an object, with a positive or negative sign indicating whether the point is inside or outside the object.
Takes a 'point' (usually 3d point) and returns a single number (usually a float).
For example, in 3D sphere, the signed distance function at a point (x, y, z) would be the radius of the sphere minus the distance from (x, y, z) to the center if the point is inside the sphere, and negative if it's outside.
This function is valuable in rendering techniques like ray-marching, where it helps determine intersections with objects in a scene efficiently.