vesicaSDF: Vesica Piscis Distance Field
Sacred Geometry through Circular Intersection
The vesicaSDF
function generates the signed distance field for a vesica piscis (fish bladder) shape. This ancient geometric form emerges from the intersection of two equal circles, creating a lens-shaped region with profound mathematical properties.
Mathematical Foundation
A vesica piscis is formed by the maximum operation of two offset circles:
where represents the horizontal separation between circle centers.
The width parameter controls the overlap between circles:
- : Complete overlap (single circle)
- : Circles touch at center
- : Circles separate with lens narrowing
Function Signature
Parameter | Type | Description |
---|---|---|
st | vec2 | Sample point coordinates |
w | float | Width separation between circle centers |
Alternative Forms
vesicaSDF(st, w)
: Customizable width parametervesicaSDFDefault(st)
: Fixed width at 0.5
Implementation Demonstrations
Live Editor
const fragment = () => { const p = uv.sub(0.5).mul(2) const width = iTime.sin().mul(0.3).add(0.6) const dist = vesicaSDF(p, width) const brightness = float(0).step(dist.negate()).mul(0.8).add(0.2) return vec4(vec3(brightness), 1) }