This is the result of some of my early experiments in Rhinoscript. Its a plugin I wrote that creates a family of surfaces called the Cyclides of Dupin.
It comes with a button you can add to your toolbar, and it allows you to vary 3 parameters to produce pretty much any possible cyclide. Some cyclides look like lop-sided donuts, some are self-intersecting, some are almost spherical. Just play around with the values and see what happens.
You can download the plugin for free from here . To install just Unzip it, then in Rhino go to Tools, Options, Plugins, Install and choose the Cyclide_maker.rhp file. To add the button go to Tools, Toolbar Layout, Toolbar, Import and choose Cyclide.tb
Another way of generating cyclides is by inverting tori and before I figured out a suitable parametrization of this, I developed a tool for inverting 3D objects which makes cyclides in a more elegant way and has turned out to be far more interesting. Still I think its been a good exercise to do this algebraically, as I think the technique will come in handy in the future.
(A word of warning – uv count allows you to specify the number of control points – dont set it too high because it produces (your value)² of control points, eg if you enter 200 it will make a surface with 40000 points which could take while)