Dupin Cyclide

The Dupin Cyclides can be looked at in various ways. They are the envelope of spheres kissing three other fixed spheres. They are also the envelope of spheres with centres on a conic and touching a sphere. This formulation, and the program, is based upon the fact that every Dupin Cyclide is the inverse of a Torus.

The Dupin Cyclide family of surfaces is a member of a larger group of surfaces referred to as Canal surfaces or Swept surfaces, all of which are envelopes of sweeping objects.

This formula is the inversion of a torus in the x-z plane, with the origin as inversion center.

      (r1^2 - dy^2 - (dx + r0)^2)*(r1^2 - dy^2 - (dx - r0)^2)*
      (x^4+y^4+z^4)+ 2*((r1^2 - dy^2 - (dx + r0)^2 )*
      (r1^2 - dy^2 - (dx - r0)^2)* (x^2*y^2+x^2*z^2+y^2*z^2))+ 
      2*ri^2*((-dy^2-dx^2+r1^2+r0^2)* (2*x*dx+2*y*dy-ri^2)-4*dy*r0^2*y)*
      (x^2+y^2+z^2)+ 4*ri^4(dx*x+dy*y)*(-ri^2+dy*y+dx*x)+
r0=Major radius of generating Torus.
r1=Minor radius of generating Torus.
dx,dy=Torus displacement.
ri=Inversion radius.


    r0=4.9,r1=5,dx=2,dy=0,ri=3  (double crescent)
    r0=3,r1=5,dx=3,dy=0,ri=9     (degenerate w. arch
    r0=6,r1=0.5,dx=3,dy=0,ri=12 (plain)

Here is the PoV3-source I used

I have also made an inc to generate PoV "poly" code. You can get it here.
Note on program. To find "interesting" shapes, it is helpful to have minor radius of the generating Torus larger than the major. Also, place the inversion center inside the Torus.