FLUKA: 8.2.5.3} Roto-translation transformation Previous Index Next

# 8.2.5.3} Roto-translation transformation

``` This directive provides a coordinate transformation, predefined by a ROT--DEFIni
card, for all bodies embedded between the two lines.

\$Start_transform [ROT-DEFIni name] (or [ROT-DEFIni number])
..............
..............
..............
\$End_transform

Two nested (signed) transformations R2 and R1 can be used, acting on a
body vector r as   r'=R2(R1(r)):

\$Start_transform R2
...
\$Start_transform R1
...
\$End_transform
...
\$End_transform

Example 1:
....
* Cylindrical target is transformed with transformation "Rotdefi1"
\$Start_transform  Rotdefi1
RCC targRepl   0.0 0.0 -5.0 0.0 0.0 10.0 5.0
\$End_transform
....
* ROT-DEFI transformation: shift of (0,-2,-30) then rotation of -21 degrees
* around the x axis
ROT-DEFI         0.0                                    -2.0     -30.0Rotdefi1
ROT-DEFI        100.                -21.                              Rotdefi1

Example 2 (with lattice):
....
* Cylindrical target
RCC target     0.0 0.0 -5.0 0.0 0.0 10.0 5.0
* Target replica is transformed with inverse transformation of the lattice
\$Start_transform  -Rotdefi1
RCC targRepl   0.0 0.0 -5.0 0.0 0.0 10.0 5.0
\$End_transform
....
* Regions
TARGET       5 +target
REPLICA      5 +targRepl
....
* Lattice
LATTICE      REPLICA                                                  Rotdefi1
....
* ROT-DEFI transformations shift of (0,-2,-30) then rotation of -21 degrees
* around the x axis
ROT-DEFI         0.0                                    -2.0     -30.0Rotdefi1
ROT-DEFI        100.                -21.                              Rotdefi1

Example 3:
ROT-DEFIni  3. -90.  0.  0.  0.  0. XtoZ
........................................
\$Start_transform XtoZ
\$Start_translat 0. -30. +20.
\$Start_expansion 10.
QUA  Elipsoid  0.0025 0.04 0.0064 0.0 0.0 0.0 0.055 0.64 0.0256 1.8881
\$End_expansion
\$End_translat
\$End_transform
transforms an ellipsoid centred at (11, 8, -2), with semiaxes 20, 5 and
12.5 cm long parallel to the coordinate axes, to a similar one with
semiaxes 200, 50 and 125 cm, centred at (11, -22, 18) and rotated by 90
degrees (axis z becomes axis x).

Example 4:
Trivial example where the combined nested transformation is the
identity. The first transformation (ft) is a rotation by 90 deg around
the y axis, followed by a shift of 10 cm along the z axis. The second
transformation is the inverse: a shift of -10 cm along the z axis and a
rotation of -90 deg around the y axis.
ROT-DEFI        200.                 90.                              ft
ROT-DEFI         0.0                                               10.ft
ROT-DEFI         0.0                                              -10.st
ROT-DEFI        200.                -90.                              st
\$start_transform st
\$start_transform ft
* Cylindrical target
RCC target     0.0 0.0 0.0 0.0 0.0 10. 2.
\$end_transform
\$end_transform

```