Skip to content
Projects

Torus

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

Torus

classsource

A solid torus: the points within minor_radius of a circle of major_radius.

inside
p∈S  ⟺  (ρ−R)2+s2≤r2p \in S \iff (\rho - R)^2 + s^2 \le r^2
level set
ϕ=(ρ−R)2+s2−r\phi = \sqrt{(\rho - R)^2 + s^2} - r
Assumes
  • major radius RR, minor radius 0<r≤R0 < r \le R, centre circle in the plane s=0s = 0 of the frame of AxisymmetricShape
  • ϕ\phi is the exact signed distance, negative inside
References
Built from