|
Italiano
Français Deutsch |
Geometric Transformations
= bundled transformations |
#declare My_Transformation = transform{ Free sequence of transformations} |
We use it like this:
object{ My_Object transform My_Transformation } |
|
|
An object called "Canoe" as well as the according hole in the surface of the water "Canoe_outside" is wanted to be
placed i.e. in 3 different positions with different sizes / positions / orientations: For this we first are defining the transformations, which lead to the wanted positions: //------------------------------------- Positions: #declare Canoe_Position1 = transform { rotate< 0,30,0> translate<0.0,0,1>} #declare Canoe_Position2 = transform { rotate<-6,20,0> translate<1.5,0,5>} #declare Canoe_Position3 = transform { rotate< 5, 0,0> scale 0.55 translate< -0.3,0,-2.00>} //-------------------------------------------------Then the canoes were placed there: //---------------------- Canoes at their positions: object{ Canoe transform Canoe_Position1} object{ Canoe transform Canoe_Position2} object{ Canoe transform Canoe_Position3} //-------------------------------------------------and also the according holes in the water: //------------------------------------------------- difference{ plane{<0,1,0>, 0 } object{Canoe_outside transform Canoe_Position1 } object{Canoe_outside transform Canoe_Position2 } object{Canoe_outside transform Canoe_Position3 } texture{Polished_Chrome normal {crackle 1 scale 5 turbulence 1 translate<0,0,5>} finish {ambient 0.15 diffuse 0.45 reflection 0.40}} }// end of difference //----------------------------------------------- end |