Descriptions and Examples for the POV-Ray Raytracer by Friedrich A. Lohmüller
Geometric Shapes in POV-Ray
Italiano Italiano
Français français
Deutsch Deutsch

Home
- POV-Ray Tutorial
 
  Geometric Shapes
   Index
Basic Shapes
  - sphere
  - cylinder
  - cone
  > torus
  - box
  - prism
  - plane
  - sor
  - lathe
  - superellipsoid
  - ovus

Shapes by macro + CSG
Shapes in "shapes3.inc"
Other Shapes by macros
3D text shapes
other Shapes
Non CSG Shapes
height_field + HF macros
Isosurfaces
                                   
Sample torus
torus = tube, ring
cone
torus
torus
general syntax:
torus{ rmajor, rminor
        texture{ ... ... }
        }
In this definition rmajor is the big radius and rminor is the little radius. The torus is placed by default in the xz-plane (horizontal) with the y-axis as the axis of it's rotation symmetry.
The radius of the outline:
   rtotal = rmajor + rminor .
The radius of the center hole:
   rinside = rmajor - rminor .
If another position is needed the torus must be transformed by "rotate< ,  ,  >" and "translate< , , >" .
Samples tori 640x480
Example here:
//------------ the yellow torus in the middle:
torus{ 1.0,0.25 scale <1,1,1>
       texture{ pigment{ color rgb<1,0.65,0>}
                finish { phong 1}
              }
       rotate<0,0,0> translate<0,0,0>
     }
//------ golden torus right in the background:
torus{ 1.0,0.25 scale <1,3,1>
       texture{ Polished_Chrome
                pigment{ color rgb<1,0.8,0>}
                normal { bumps 0.5 scale 0.15}
                finish { phong 1 }
              }
       rotate<90,0,0> translate<4,3,2>
     }
//--------- the flat silver ring on the left:
torus{ 1.0,0.65 scale <1.5,0.33,1>
       texture{ Polished_Chrome
                pigment{ color rgb<1,1,0.5>}
                normal { bumps 0.5 scale 0.15}
                finish { phong 1}
              }
       rotate<0,0,90> translate<-1,3,-2>
     }
//--------------------------------------------

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