Rotate and scale a region about its center of gravity, and translate the result.
rotate_region2 rotates the region given in Region counter-clockwise by an angle of Phi. Furthermore, it is scaled by a scale factor of Factor. In both cases, the fixed point of the transformation is the center of gravity of the region. Finally the rotated and scaled region is translated by the vector given in (Row,Column). If necessary, the resulting region is clipped with the current image size.
rotate_region2 in general is not invertible (clipping and discretization during rotation and scaling).
Region (input_object) |
region(-array) -> object |
Region to be rotated, scaled, and translated. |
RegionRotate (output_object) |
region(-array) -> object |
Transformed output region. | |
Number of elements: RegionRotate == Region |
Row (input_control) |
point.y -> integer |
Row coordinate of the translation vector. | |
Default value: 0 | |
Suggested values: -256, -128, -64, -32, -16, -10, -5, 0, 5, 10, 16, 32, 64, 128, 256 | |
Range of values: -512 <= Row <= 512 (lin) | |
Minimum increment: 1 | |
Recommended increment: 10 |
Column (input_control) |
point.x -> integer |
Row coordinate of the translation vector. | |
Default value: 0 | |
Suggested values: -256, -128, -64, -32, -16, -10, -5, 0, 5, 10, 16, 32, 64, 128, 256 | |
Range of values: -512 <= Column <= 512 (lin) | |
Minimum increment: 1 | |
Recommended increment: 10 |
Phi (input_control) |
angle.rad -> real |
Rotation angle (in radians). | |
Default value: 3.14 | |
Suggested values: -3.1415, -2.3462, -1.57079, -0.78539, 0, 0.78539, 1.57079, 2.3462, 3.1415 | |
Range of values: -3.14156 <= Phi <= 3.14156 | |
Minimum increment: 0.0001 | |
Recommended increment: 0.05 |
Factor (input_control) |
real -> real |
Scale factor. | |
Default value: 0.5 | |
Suggested values: 0.1, 0.2, .0.5, 0.8, 1.0, 1.5, 2.0, 5.0, 10.0, 20.0 | |
Minimum increment: 0.0001 | |
Recommended increment: 0.1 | |
Restriction: Factor > 0.0 |
rotate_region2 returns TRUE if all parameters are correct. The behavior in case of empty input (no regions given) can be set via set_system(::'no_object_result',<Result>:), the behavior in case of an empty input region via set_system(::'empty_region_result',<Result>:), and the behavior in case of an empty result region via set_system(::'store_empty_region',<true/false>:). If necessary, an exception is raised.
threshold__, connection, regiongrowing__, pouring
rotate_region1, move, zoom_region