Skip to content
Projects

Sphere

The equations of simgeometry.objects.sphere, declared on the code that implements them and checked by the tests.

Sphere

classsource

Represent a spherical geometry object.

inside
p∈S  ⟺  ∣p−c∣2≤r2p \in S \iff |p - c|^2 \le r^2
level set
ϕ(p)=∣p−c∣−r\phi(p) = |p - c| - r
Assumes
  • closed: points on the sphere are inside
  • ϕ\phi is the exact signed distance, negative inside