Descriptions and Samples for the POV-Ray Raytracer by Friedrich A. Lohmüller
    deutsche Version

mast overview back to tutorial overview

Construction of a Canoe
and positioning on the water
by "transform{...}"

Objects:    "sphere", "box" "plane"
Methods: "declare", "union", "intersection", "transform{...}"
Canoe sample 600x450 Canoe sample 600x450
The outline is an ellipsoid - it becomes a canoe.

The shape of an ellipsoid forms the outside of a canoe. This shape is caved out by a smaler scaled version of itself. ("intersection" with "inverse")
From this an ellipsoid will be cut off:

#declare Canoe_outside=
sphere {<0,0,0>,1 scale <3,1.5,1>  translate<0,0.5,0> }
//-----------------------------------------------------
#declare Canoe =
intersection{
 object{ Canoe_outside }
 object{ Canoe_outside scale <0.98,0.95,0.94> inverse}
 sphere {<0,0,0>,1 scale <2.5,1,20> translate<0,1.3,0> inverse}
 texture{pigment{color White*1.1}
 finish {ambient 0.45 diffuse 0.55 phong 1}}
 } // end of outside structure of the canoe -------------------
Naturally we should addmit us some seats inside of the canue!
If we place the canoe simply on the surface of the water
the user will get wet feed!
Canoe sample 600x450
To avoid this we must subtract
the outside shape of the canoe
from the water plane
right at the same place we want to position our canoe
Canoe hole
Like this a canoe is pure fun! Canoe sample 600x450

To make it easier to put the hole in the water right in the same position as the canoe, it is recommanded to define the position and may be also any rotation in a transformation:
#declare Canoe_Position1
  = transform{ rotate < 0,30, 0> translate<0,0,1>}
This transformation then can be used as well as for our canoe also for the hole in the water (Canoe_outside):

//-------------------------------------< place canoe
object{ Canoe transform Canoe_Position1}

// -----------------------------------< hole in the water
difference{
plane{<0,1,0>, 0 } // the water
object{Canoe_outside
       transform Canoe_Position1 } // the hole
   texture{Polished_Chrome
                    normal {crackle 1 scale 5
                            turbulence 1 translate<0,0,5>}
                    finish {ambient 0.35 diffuse 0.25
                            reflection 0.40}}
          }// end of difference
//---------------------------------------------------- end
The real effectivness of this method naturally comes into play only if we can afford more than one canoe!
Canoe sample 600x450 Canoe sample 600x450

The complete scene description for POV-Ray is here!


mast overview back to tutorial overview

© Friedrich A. Lohmüller, 2003    emailemail: (legacy email redacted)