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
 
  Geometric Shapes
   Index
Basic Shapes
  - sphere
  - cylinder
  - cone
  -> torus
  - box
  - prism
  - plane
  - sor
  - lathe
  - superellipsoid
Shapes by macro + CSG
Shapes in "shapes_lo.inc"
3D text shapes
other Shapes
Non CSG Shapes
height_field + HF macros
Isosurfaces
                                   

Basic Geometic Objects

Sample torus

torus = tube, ring

torus
torus, ring
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.
If another position is needed the torus must be transformed by "rotate< ,  ,  >" and "translate< , , >" .
The radius of the outline is calculated by
rtotal = rmajor + rminor .
The radius of the hole in the middle of the torus is
rinside = rmajor - rminor .
Samples tori 640x480
The sample here:

//--------------- the yellow torus in the middle: ------------------
torus {1.0,0.25 scale <1,1,1> rotate<0,0,0> translate<0,0,0>
       texture{pigment{color rgb<1,0.65,0>}
               finish {ambient 0.15 diffuse 0.85 phong 1}}}
//--------------- the golden torus right in the background: --------
torus {1.0,0.25 scale <1,3,1> rotate<90,0,0> translate<4,3,2>
       texture{Polished_Chrome
               pigment{color rgb<1,0.8,0>}
               normal {bumps 0.5 scale 0.15}
               finish {ambient 0.15 diffuse 0.55 phong 1}}}
//---------------the flat silver ring on the left: -----------------
torus {1.0,0.65 scale <1.5,0.33,1> rotate<0,0,90> translate<-1,3,-2>
       texture{Polished_Chrome
               pigment{color rgb<1,1,0.5>}
               normal {bumps 0.5 scale 0.15}
               finish {ambient 0.15 diffuse 0.55 phong 1}}}
//------------------------------------------------------------------

© Friedrich A. Lohmüller, 2007
email email: Friedrich.Lohmueller_at_t-online.de
homepage:http://www.f-lohmueller.de
  top