Skip to main content

Torus

Code Example

float torusSDF(vec3 p, float r, float t) {
        vec2 q = vec2(length(p.yz) - r + t, p.x);
        return length(q) - t;
}