Descriptions and Samples for the POV-Ray Raytracer by Friedrich A. Lohmüller
Italiano Italiano
Deutsch Deutsch

Threefold Fishblob overview Overview

 
Trefoil

The Construction of a Trefoil.

Objects:    "torus", "box", "plane".
Methods: "#declare", "union", "difference", "object{...}"

The Construction in Details:

How to define the radius Ri of the inner circles:

The radius of all torus tubes is called by R0. Ri is the radius of the inner circles. Ra is the radius of the outer circle.
See the opposite image:
Ri (dark green) = Ra/2 + R0/2.
This increasing by "+ R0/2" is neccesary to get the inner rings ending right above <0,0,0> (marked by the red arrow!). Only in this way the rotated plane (or an according box) can cut off the upper parts right and left from the torus. The opposite image shows the right plane of these two planes used for cut off (transparent yellow).
The inner torus (orange) and
one of the planes used for cut off (yellow)
// outer radius:
#declare Ra = 3.00 -R0;
// radius of inner circles;
#declare Ri  = Ra /2+ R0/2;

#declare Part =
intersection{
torus{ Ri,  R0
       rotate<90,0,0>
       translate<0,-Ra+Ri,0>}
plane { <0,1,0>,0 rotate<0,0, 30>}
plane { <0,1,0>,0 rotate<0,0,-30>}
box{<-Ri-R0,-Ra-R0,-R0>,
     <Ri+R0, 0,R0>}
}// ------- end of "Part" --------
union{   //-----------------------
torus{ Ra,  R0
       rotate<90,0,0>
      } // end of torus  ---------

object{ Part rotate<0,0,0*120>}
object{ Part rotate<0,0,1*120>}
object{ Part rotate<0,0,2*120>}
}// end of union
//---------------------------- end
Click here for the complete scene file for POV-Ray:
".txt" file or ".pov" file

Threefold Fishblob overview Overview

© Friedrich A. Lohmüller, 2004
email email: (legacy email redacted)
homepage:www.f-lohmueller.de