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

       
overview objects "cylinder" - tube

Basic Geometic Objects

Sample sphere

sphere = ellipsoid,
ball


Samples spheres 600x450
sphere = ellipsoid
general syntax:
sphere{ <xM,yM,zM>, r
        texture{ ... ... }
      }
In this case <xM,yM,zM> are the coordinates of the center and r is the radius.
The samples here:
sphere{< 0,0, 0>,1.0 texture{...}}
sphere{<-1,2,-3>,1.0 texture{...}}
sphere{< 2,3, 5>,1.0 texture{...}}

If a sphere has to be deformed by "scale< , , >" to a ellipsoid, it's recommanded to do this according to the following
principle of construction:
1st step: Deforming the shape at the origin of the coordinates "<0,0,0>" by "scale< , , >" and then
2nd step: Moving the shape to it's final position in the world by "translate< , , >".
Because the "scale< , , >" works always relative to the center "<0,0,0>" it's recommanded to do it before translating!.

Samples spheres 600x450
sphere + scale<...> = ellipsoid
general syntax:
sphere{ <xM,yM,zM>, r scale<sx,sy,sz>
        texture{ ... ... }
      }
Here <xM,yM,zM> are the coordinates of the center and r is the radius and sx,sy,sz are the scale factors in x-, y- and z-direction.
The samples here:
sphere{<0,0,0>,1.0 scale<2,0.4,1>
      translate< 0,0, 0> texture{...}}
sphere{<0,0,0>,1.0 scale<1,1,2>
      translate<-1,2,-3> texture{...}}
sphere{<0,0,0>,1.0 scale<1,1,0.2>
      translate< 2,3, 5> texture{...}}




overview overview objects "cylinder" - tube

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