Skip to main content

sdf_sphere

Function sdf_sphere 

Source
pub fn sdf_sphere(p: [f64; 3], center: [f64; 3], r: f64) -> f64
Expand description

Signed distance from point p to a sphere at center with radius r.

Negative inside, positive outside, zero on the surface.