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{ ...}"

    Vector
    Transformations
    - vrotate, vaxis_rotate

    Insert Menu Add-on
      & Download
 
                                       

Vector Transformations

Two important transformations for vectors are already implementated in POV-Ray as basic functions by macros.

vrotate( V, <Rotate_X, Rotate_Y, Rotate_Z>)
Rotation of a vector V around the center <0,0,0>
by a rotation vector <Rotate_X, Rotate_Y, Rotate_Z>.
vrotate(< 2.5,1,0>,
        < 0, 90, 0>) 
vrotate sample

vaxis_rotate( V1, V2, A)
Rotates V1 around V2 by A degrees
Rotation of a vector around another vector as axis of rotation.
vaxis_rotate(< 0, 1, 0.5>,
             < 2, 3,   0>,
                       70 ) 
vaxis_rotate sample

The vector transformations shown here are also available as text templates in the section "Shearing & transform" in my "Insert Menu Add-on" .

translate | rotate | scale | matrix | shearing | transforms.inc | transform | vector transformations
top
© Friedrich A. Lohmüller, 2006
email email: Friedrich.Lohmueller_at_t-online.de
homepage:http://www.f-lohmueller.de