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

             
overview "rotate"

Geometric Transformations

"translate"   = move


Samples translation 640x480
translate = move
general syntax:
translate <x1,y1,z1>
this moves an object relative to it's current position
by x1 in x direction (horizontal)
by y1 in y direction (vertical) and
by z1 in z direction (deepth).
Sample:
#declare OrangeYellow = color rgb<1,0.85,0>;
#declare Ball1 =
 sphere{<0,0,0>,1  
        texture{pigment{color OrangeYellow}
                finish {ambient 0.25 diffuse 0.75 phong 1}}}
//----------------------------------------------------------
#declare Ball2 = 
 sphere{<0,0,0>,1  
 texture{pigment{color NeonPink}
finish {ambient 0.15 diffuse 0.85 phong 1}}} //---------------------------------------------------------- object{Ball1 translate< 4, 0,-4>} object{Ball1 translate< 4, 0, 0>} object{Ball1 translate< 4, 0, 4>} object{Ball1 translate< 4, 0, 8>} object{Ball1 translate< 4, 2, 8>} object{Ball1 translate< 4, 4, 8>} object{Ball1 translate< 4, 6, 8>} object{Ball1 translate< 4, 8, 8>}
object{Ball2 translate<-4, 2,0>} object{Ball2 translate<-2, 2,0>} object{Ball2 translate< 0, 2,0>} object{Ball2 translate< 2, 2,0>} object{Ball2 translate< 4, 2,0>} object{Ball2 translate<-4, 2,4>} object{Ball2 translate<-2, 2,4>} object{Ball2 translate< 0, 2,4>} object{Ball2 translate< 2, 2,4>} object{Ball2 translate< 4, 2,4>}

Hint:
We can use "translate" also with other objects like light sources, textures("texture"), color patterns ("pigment") and simulated surface structures ("normal").


overview "rotate"

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