Trefoil Shader
I recently came across an interesting shape –the Trefoil Knot:
I thought it would be a great subject for a ray marching playaround. The geometry is quite intricate, but I quickly realized there wasn’t a standard signed distance function (SDF) available for it (or at least I couldn’t find one). To solve this, I took a route based on Inigo Quilez’s work with Bézier splines, representing the knot as a series of spline segments:
Once the core geometry was working, I built out the rest of the scene with procedural texturing, animation, and a lighting setup to pull the whole look together. Click on the image to see the result in action.
