MoI discussion forum
MoI discussion forum

Full Version: Torus by Revolve

From: bemfarmer
6 Sep 2017   [#1]
This script creates a Torus by Revolve of a meridian circle, which is also easy to do manually.
There is an option to create two Yvon-Villarceau circles, when R > r.
Rradius corresponds to the major radius "R" of a torus.
( For a Dupin cyclide the corresponding radius is "a", or aRadius. )
mradius is the meridian circle radius, the minor radius "r" of a torus.
The minimum mradius (= r) is set to .01 units, to avoid an error.
( For a Dupin cyclide, the corresponding radius is the "mu" radius. )
( For a Dupin cyclide, variable "c" is an elliptical parameter. )
( The envelope of certain spheres, centered on the ellipse, is a Dupin cyclide. )
( Note that a torus is "simply a degenerate Dupin cyclide having c=0." )
(The DupinCyclidesUV script will produce a torus.)

To deal with boundary conditions, which caused errors, some minor compromises were made.
R and r are made positive with Math.abs().
For positive values of R and r:
A ring torus has Rradius > mradius. (R > r)
A horn torus has Rradius = mradius. (R = r), but a script error would occur, so if( R = r ) R = r + 0.01 units., not quite a horn torus.

A spindle torus has Rradius < mradius. (R < r).
This script will produce a spindle torus.
When R = 0, the torus degenerates to the sphere.
The minimum angle of revolve is set to 0.1 degrees.
The maximum angle of revolve is set to 360 degrees.
If manually using MoI for revolve of a circle, somehow MoI deals which this situation. But usually MoI does not make the horn torus either.

Please report any errors.

One Yvon-Villarceau circles, circularly arrayed, was used to trim a torus, deleting alternate surfaces.
- Brian

Attachments:
_TorusByRevolve.zip