gen_ellipse_sector
— Create an ellipse sector.
gen_ellipse_sector( : EllipseSector : Row, Column, Phi, Radius1, Radius2, StartAngle, EndAngle : )
The operator gen_ellipse_sector
generates one or more ellipse
sectors with the center
(Row
, Column
), the orientation Phi
,
the half-radii Radius1
and Radius2
, and the start and end
angles StartAngle
and EndAngle
.
The angle is indicated in radians in mathematically positive direction.
An illustration showing this can be found in the reference of
gen_circle_sector
.
More than one region can be created by
passing tuples of parameter values.
The center must be located within the image coordinates.
The coordinate system runs from (0,0) (upper left corner) to
(Width-1,Height-1). See get_system
and reset_obj_db
in this context.
If the ellipse reaches beyond the edge of the image it is clipped
to the current image format according to the value of
the system flag 'clip_region' (set_system
).
EllipseSector
(output_object) region(-array) →
object
Created ellipse(s).
Row
(input_control) coordinates.y(-array) →
(real / integer)
Line index of center.
Default value: 200.0
Suggested values: 0.0, 10.0, 20.0, 50.0, 100.0, 256.0, 300.0, 400.0
Typical range of values: 1.0
≤
Row
≤
1024.0
(lin)
Minimum increment: 1.0
Recommended increment: 10.0
Column
(input_control) coordinates.x(-array) →
(real / integer)
Column index of center.
Default value: 200.0
Suggested values: 0.0, 10.0, 20.0, 50.0, 100.0, 256.0, 300.0, 400.0
Typical range of values: 1.0
≤
Column
≤
1024.0
(lin)
Minimum increment: 1.0
Recommended increment: 10.0
Phi
(input_control) angle.rad(-array) →
(real / integer)
Orientation of the longer radius (Radius1).
Default value: 0.0
Suggested values: -1.5707, -1.1781, -0.785398, -0.392699, 0.0, 0.392699, 0.785398, 1.1781, 1.5707
Typical range of values: -1.570796
≤
Phi
≤
1.570796
(lin)
Restriction: - pi / 2 <= Phi <= pi / 2
Radius1
(input_control) number(-array) →
(real / integer)
Longer radius.
Default value: 100.0
Suggested values: 2.0, 5.0, 10.0, 20.0, 50.0, 100.0, 256.0, 300.0, 400.0
Typical range of values: 1.0
≤
Radius1
≤
1024.0
(lin)
Minimum increment: 1.0
Recommended increment: 10.0
Restriction: Radius1 > 0
Radius2
(input_control) number(-array) →
(real / integer)
Shorter radius.
Default value: 60.0
Suggested values: 1.0, 2.0, 4.0, 5.0, 10.0, 20.0, 50.0, 100.0, 256.0, 300.0, 400.0
Typical range of values: 1.0
≤
Radius2
≤
1024.0
(lin)
Minimum increment: 1.0
Recommended increment: 10.0
Restriction: Radius2 > 0 && Radius2 <= Radius1
StartAngle
(input_control) angle.rad(-array) →
(real / integer)
Start angle of the sector.
Default value: 0.0
Suggested values: 0.0, 0.785398, 1.5708, 2.35619, 3.14159, 3.92699, 4.71239, 5.49779, 6.28318
Typical range of values: 0
≤
StartAngle
≤
6.28318
(lin)
Restriction: 0 <= StartAngle && StartAngle <= 2 * pi
EndAngle
(input_control) angle.rad(-array) →
(real / integer)
End angle of the sector.
Default value: 3.14159
Suggested values: 0.0, 0.785398, 1.5708, 2.35619, 3.14159, 3.92699, 4.71239, 5.49779, 6.28318
Typical range of values: 0
≤
EndAngle
≤
6.28318
(lin)
Restriction: 0 <= EndAngle && EndAngle <= 2 * pi
read_image (Image, 'fabrik') gen_ellipse_sector (EllipseSector, 200, 200, rad(30),\ 150, 90, rad(45), rad(280)) reduce_domain (Image, EllipseSector, ImageReduced) dev_clear_window () dev_display (ImageReduced)
Runtime complexity: O(Radius1
* 2)
Storage complexity (byte): O(Radius1
* 8)
If the parameter values are correct, the operator gen_ellipse
returns the value 2 (H_MSG_TRUE). Otherwise an exception is raised.
The clipping according to the current image format is set via the
operator set_system('clip_region',<'true'/'false'>)
.
gen_circle
,
gen_circle_sector
,
gen_region_polygon_filled
,
draw_ellipse
,
gen_ellipse
disp_ellipse
,
set_shape
,
smallest_circle
,
reduce_domain
Foundation