partition_dynamic — Partition a region horizontally at positions of small vertical extent.
partition_dynamic partitions the input
into regions that have an approximate width of
Distance. The input
region is split at positions where it has a relativly small vertical extent.
The positions where the input region is split are determined by the
following approach: First, initial split positions are determined such that
they are equally distributed over the horizontal extent of the input region,
i.e., such that all the resulting parts would have the same width. For
this, the number n of resulting parts is determined by dividing the width
of the input region by
Distance and rounding the result to the
closest integer value. The distance between the initial split positions is
now calculated by dividing the width of the input region by n. Note that
the distance between these initial split positions is typically not
Distance. Then, the final split positions are
determined in the neighborhood of the initial split positions such that the
input region is split at positions where it has the least vertical extent
within this neighborhood. The maximum deviation of the final split position
from the initial split position is
The resulting regions are returned in
Partitioned. Note that the
input region is only partitioned if its width is larger than 1.5 times
Region to be partitioned.
Approximate width of the resulting region parts.
Maximum percental shift of the split position.
Default value: 20
Suggested values: 0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 70.0, 90.0, 100.0
Typical range of values:
partition_dynamic returns 2 (H_MSG_TRUE) if all parameters are
correct. The behavior in case of empty input (no regions given) can
be set via
the behavior in case of an empty input region via
and the behavior in case of an empty result region via
If necessary, an exception is raised.