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

Home
- POV-Ray Tutorial
  Geometric
  Transformations
   - Index

    Elementary
    Transformations
    - "translate<  ... >"
    - "rotate<  ... >"
    - "scale<  ... >"
    - mirror symmetry;

    Other
    Transformations
    - "matrix<  ... >"
    - Shearing
    - transforms.inc

    - "transform{ ...}"
       and "inverse"

    Vectors and
    Transformations

    Insert Menu Add-on
      & Download
 
                                           

"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 { diffuse 0.9 phong 1}}
 }
//-------------------------------------------------
#declare Ball2 =
 sphere{<0,0,0>,1
 texture{ pigment{ color NeonPink}
          finish { diffuse 0.9 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").


translate | rotate | scale | matrix | shearing | transforms.inc | transform | vector transformations
top
© Friedrich A. Lohmüller, 2006
www.f-lohmueller.de