13. Localization system¶
The localization system category contains only localizationSystem
elements.
A localization system is an HDF5 named group child of /localizationSystem
with two attributes :
reference
is an HDF5 string attribute and is optional. It represents the reference localization system (an absolute localization system has no reference).dimension
is an HDF5 integer attribute and is mandatory. It represents the dimension of the system.
data.h5
`-- localizationSystem/
|-- $locsys[@dimension=3]
`-- $locsys1[@dimension=3
@reference=/localizationSystem/$locsys]
A localization system comprises elementary geometric transformations, a transformation can be :
Scale transformation
Rotation
Translation
These elementary transformations are the children of a localization system
and have a string attribute type
equals scale
, rotation
,
translation
or zxzEulerRotation
.
Example :
data.h5
`-- localizationSystem/
|-- $locsys[@dimension=3]/
`-- $locsys1[@dimension=3
@reference=/localizationSystem/$locsys1]/
Note
If a localization system has no transformations child, it is equivalent to the reference localization system.
Each transformation moves, rotates or scales the localization relative to the reference localization system in sequence.
13.1. Transformation order¶
Transformations have to be ordered to give the correct result. The order is
stored in a mandatory attribute rank
owned by all transformations.
data.h5
`-- localizationSystem/
`-- $locsys[@dimension=3]/
|-- $scale1[@type=scale
| @rank=2]
|-- $rotation1[@type=rotation
| @rank=1]
`-- $translation1[@type=translation
@$rank=3]
Transformations will then be applied in the following order :
1 |
$rotation1 |
2 |
$scale1 |
3 |
$translation1 |
13.2. Scale transformation¶
A scale transformation is simply a scale factor, it is a HDF5 named
floatingType
equals dataSet
of one float element
with type
equals scale
.
Example :
data.h5
`-- localizationSystem/
`-- $locsys[@dimension=3]/
`-- $scale1[@type=scale]
where data.h5:/localizationSystem/$locsys/$scale1
:
13.3. Rotation¶
A rotation is defined by a 3x3 matrix :
The point coodinates are calculated with :
Example of a rotation of \(\alpha\) around the x axis :
In Amelet HDF, a rotation is a HDF5 named
floatingType
equals dataSet
of 3x3 floats elements
with type
equals rotation
.
Example :
data.h5
`-- localizationSystem/
`-- $locsys[@dimension=3]/
`-- $rotation1[@type=rotation]
where data.h5:/localizationSystem/$locsys/$rotation1
:
13.4. Euler rotation¶
Rotation can be expressed with the zxz Euler convention.
Three consecutive rotations \(D, C, B\) are applied :
A rotation around the Z axis, angle \(\phi\)
A rotation around the X axis , angle \(\theta \in [0, \pi]\)
A rotation around the z axis, angle \(\psi\)
And finaly the resultant matrix \(A = BCD\)
In Amelet HDF, an Euler rotation is a HDF5 named
floatingType
equals vector
of 3 floats elements
\((\phi, \theta, \psi)\) with type
equals zxzEulerRotation
.
Example :
data.h5
`-- localizationSystem/
`-- $locsys[@dimension=3]/
`-- $euler1[@type=zxzEulerRotation]
where data.h5:/localizationSystem/$locsys/$euler1
:
13.5. Translation¶
A translation is defined by a vector \(T(T_x, T_y, T_z)\).
In Amelet HDF, a translation is a HDF5 named
floatingType
equals vector
of 3 floats elements
with type
equals translation
.
Example :
data.h5
`-- localizationSystem/
`-- $locsys[@dimension=3]/
`-- $translation1[@type=translation]
where data.h5:/localizationSystem/$locsys/$translation1
: