Supertoroid

class Supertoroid : public feasst::Shape

As currently implemented, the is_inside function does not take into account the diameter of the particle. So different size particles will experience difference sized cavities if using ModelHardShape. Put another way, only the center position is considered.

A supertoroid is given by the following surface vector

{a1[a4+cos(η)1ϵ]cos(ω)2ϵπηπa2[a4+cos(η)1ϵ]sin(ω)2ϵπωπa3sin(η)1ϵ}

with an implicit function, F, where F=1 at the surface, F<1 inside, and F>1 outside,

(((xa1)2ϵ2+(ya2)2ϵ2)ϵ22a4)2ϵ1+(za3)2ϵ1.

The size of the hole is related to a4, where the radius of the toroid, R=a4a12+a22.

To model a superquadric, set a4=0.

Arguments

  • center: set the unique key for the center positions. Thus, arguments of “key[i]” are expected to follow. The “[i]” is to be substituted for integer dimensions 0, 1, 2, … The “[i]” are also expected to be in order, starting from 0. If center arg is not used, a three dimensional origin is assumed.

  • a1: (default: 1).

  • a2: (default: 1).

  • a3: (default: 1).

  • a4: (default: 0).

  • epsilon1: (default: 1).

  • epsilon2: (default: 1).