Home
- POV-Ray Tutorial
Geometric
Transformations
- Index
Elementary
Transformations
- "translate< ... >"
- "rotate< ... >"
- "scale< ... >"
- mirror symmetry
Other
Transformations
- "matrix< ... >"
- Shearing
- "transforms.inc"
- Shear_Trans(...)
- Matrix_Trans(...)
- Axial_Scale_Tr.
- Rotate_Around
- Axis_Rotate_Tr.
- Reorient_Trans
- "transform{ ...}"
Vector
Transformations
- vrotate, vaxis_rotate
Insert Menu Add-on
& Download
|
Transformations in "transforms.inc"
|
Some additional useful combinations of
transformations are defined as macros in the include file "transforms.inc".
Before we are able to use them, we have to add (somewhere in the top part of our scene file)
the following line to our text:
#include "transforms.inc"
|
Shear_Trans( New_X, New_Y, New_Z)
Multible Shearing:
The former x axis points to the vector New_X, the y axis points to New_Y
and the z axis points to New_Z.
Shear_Trans(< 2, 0.5, 0>,
< 0, 0.5, 0>,
< 0, 0.5, 0.5>) |
|
|
|
Matrix_Trans( New_X, New_Y, New_Z, D)
Multible Shearing + Translation:
The former x axis points to the vector New_X, the y axis points to New_Y
and the z axis points to New_Z and there is added a translation by the vector D.
Matrix_Trans(< 2, 0.5, 0>,
< 0, 0.5, 0>,
< 0, 0.5, 0.5>,
<-0.5, 0, 0>) |
|
|
|
Axial_Scale_Trans( Axis, Amount )
Stretching in the direction of an axis "Axis"
by the factor "Amount"
Axial_Scale_Trans(< 2,0,2>, 0.5)
|
|
|
|
Rotate_Around_Trans( <Rotate_x,Rotate_y,Rotate_z>, Center_of_Rotation)
Rotation with the rotation vector <Rotate_x,Rotate_y,Rotate_z>
around the center "Center_of_Rotation".
Rotate_Around_Trans(< 0, 0, 20>,
< 1.5,0.5, 1>) |
|
|
|
Axis_Rotate_Trans( Axis, Angle )
Rotation around an axis "Axis" by an angle of "Angle"(in degrees).
Axis_Rotate_Trans(< 1,0,2>, 110) |
|
|
|
Reorient_Trans( Axis_1, Axis_2 )
Reorientation by rotation
of an axis "Axis_1" to a new axis "Axis_2".
Reorient_Trans(< 1,0,0>,
< 1,0.0,2>) |
|
|
|
The transformations shown here are also available as text templates
in the section "Shearing & transform"
in my "Insert Menu Add-on"
|