RTC
®
5 PC Interface Board
Rev. 1.9 e
8 Advanced Functions for Scan Head and Laser Control
162
innovators for industry
The coefficients m
11
… m
22
of the general transfor-
mation matrix M
T
:
With the general transformation matrix M
T
, the two
above matrices (M
S
and M
R
, as special case) as well
as further transformations for scaling, rotating,
mirroring or skewing objects can be defined:
• Scaling by the factors
and
:
• Rotation by the angle
:
For instance, the command
set_matrix( 1, 0.5, -0.866, 0.866, 0.5, 1 )
defines – for the primary scan head connector –
an immediate rotation by 60° (counterclockwise)
around the center of the image field. This can also
be achieved via the command
set_angle(1,60)
.
• Mirroring around the Y axis (flipping in the X
direction):
• Mirroring around the X axis (flipping in the Y
direction):
• Mirroring around the first dimension diagonal
(exchanging the X and Y coordinates):
• Skewing in the X direction by the angle
(slanting):
Example:
set_matrix( 1, 1, -0.25, 0, 1, 0 )
A general transformation defined via
or
can also represent a combination of
various transformations (the user can calculate the
corresponding matrix M
T
by multiplying the corre-
sponding individual matrices in the correct order).
Notes
• The described coordinate transformations are
primarily intended for small corrections when
setting up the scan system relative to the image
field. Separate settings for scaling and rotations
thereby provide more handling flexibility in
comparison to a single matrix setting.
) results in
an offset of (0|0|0) and in matrices M
S
, M
R
and
M
T
, each predefined as identity matrices.
• Each matrix or offset definition overwrites prior
definitions.
• The RTC
®
5 calculates the total matrix M indepen-
dently of the order in which the offset and
individual transformation matrices were defined.
• The value range of scaling factor
k
for the scaling
matrix M
S
is [–16 … +16]. The value range for the
coefficients of the general transformation matrix
M
T
is [–50 … +50]. Also be sure that the value
range [–50 … +50] for individual coefficients of
the total matrix M are not exceeded; otherwise
calculation of the corrected coordinates might
result, under some circumstances, in overflows.
• Rotations are exclusively around the centerpoint
of the image field; mirroring is relative to the
axes. It is the user’s responsibility to calculate and
make available suitable offset translations.
• For each definition, the parameter
at_once
can
be used to specify whether the new setting
should have immediate effect on the current
position (
at_once
= 1 or 3) or whether it should
only be provisionally collected and intermediately
stored (
at_once
= 0 or 2). For collection via list
commands, the commands don’t necessarily
need to directly follow each other. The most
recently issued
at_once
parameter value deter-
mines when a (collected) transformation takes
effect.
• Before the (possibly collected) total transfor-
mation is applied to the current position, the
“laser active” laser control signals with
at_once
= 0 to 2 will be switched off; but with
at_once
= 3 the laser control signals remain
unaffected.
M
T
m
11
m
12
m
21
m
22
=
k
X
k
Y
M
T
k
–
X
0
0
k
–
Y
i
=
M
T
cos
o
–
o
sin
–
sin
o
–
cos
=
M
T
1
–
0
0 1
=
M
T
1
0
0
1
–
=
M
T
0 1
1 0
=
M
T
1
o
–
sin
–
0
o
–
1
–
=