Descriptions and Examples for the POV-Ray Raytracer by Friedrich A. Lohmüller
    POV-Ray Examples - How To Make Objects for POV-Ray
Italiano Italiano
Français français
Deutsch Deutsch

Home
- POV-Ray Tutorial

  - POV-Ray Examples
   Index of Content
  - Geometry
    - Pawn
    - Wireframe Cube
    - Octagon
    - Egg Shape
    - Star
    - Optical Lens
    - Chessboard
    - Regular Tetrahedron
    - Penrose Triangle
    - Yin & Yang
    - Fishblob
    - Threefold
    - Trefoil
  - Architecture
  - Engineering
                                       
 
trefoil

Trefoil

Objects: "torus".
Methods: "#declare", "union{...}", "object{...}", "intersection{...}".

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 exactly 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 at the right and left side from the torus. The opposite image shows the right plane of these two planes used for cuting off (transparent yellow).
The inner torus (orange) and
one of the planes used for cuting off (yellow).
// Äußerer Radius:
#declare Ra = 3.00 -R0;
// Radius der inneren Kreise;
#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>}
}// ------- Ende von "Part" ------
union{   //-----------------------
torus{ Ra,  R0
       rotate<90,0,0>
      } // Ende des Torus  -------

object{ Part rotate<0,0,0*120>}
object{ Part rotate<0,0,1*120>}
object{ Part rotate<0,0,2*120>}
}// Ende der Union
//---------------------------- end
Scene description
for POV-Ray:
".txt" file or ".pov" file
 
top

© Friedrich A. Lohmüller, 2006
www.f-lohmueller.de