Previous:Superquadric Ellipsoid Object   Main Index   Next:Text Object

Surface of Revolution Object

Bottles, vases and glasses make nice objects in ray-traced scenes. We want to create a golden cup using the surface of revolution object (SOR object).

We first start by thinking about the shape of the final object. It is quite difficult to come up with a set of points that describe a given curve without the help of a modeling program supporting POV-Ray's surface of revolution object. If such a program is available we should take advantage of it.

The point configuration of our cup object.

We will use the point configuration shown in the figure above. There are eight points describing the curve that will be rotated about the y-axis to get our cup. The curve was calculated using the method described in the reference section (see "Surface of Revolution").

Now it is time to come up with a scene that uses the above SOR object. We edit a file called sordemo.pov and enter the following text.

  #include ""

  #include ""

  global_settings { assumed_gamma 2.2 }

  camera {

    location <10, 15, -20>

    look_at <0, 5, 0>

    angle 45


  background { color rgb<0.2, 0.4, 0.8>  }

  light_source { <100, 100, -100> color rgb 1 }

  plane { y, 0

    pigment { checker color Red, color Green scale 10 }


  sor {


    <0.0,  -0.5>,

    <3.0,   0.0>,

    <1.0,   0.2>,

    <0.5,   0.4>,

    <0.5,   4.0>,

    <1.0,   5.0>,

    <3.0,  10.0>,

    <4.0,  11.0>

    texture { T_Gold_1B }


The scene contains our cup object resting on a checkered plane. Tracing this scene results in the image below.

A surface of revolution object.

The surface of revolution is described by starting with the number of points followed by the points with ascending heights. Each point determines the radius of the curve for a given height. E. g. the first point tells POV-Ray that at height -0.5 the radius is 0. We should take care that each point has a larger height than its predecessor. If this is not the case the program will abort with an error message.

Previous:Superquadric Ellipsoid Object   Main Index   Next:Text Object