gen_ellipse_sectorgen_ellipse_sectorGenEllipseSectorGenEllipseSector (Operator)

Name

gen_ellipse_sectorgen_ellipse_sectorGenEllipseSectorGenEllipseSector — Create an ellipse sector.

Signature

gen_ellipse_sector( : EllipseSector : Row, Column, Phi, Radius1, Radius2, StartAngle, EndAngle : )

Herror gen_ellipse_sector(Hobject* EllipseSector, double Row, double Column, double Phi, double Radius1, double Radius2, double StartAngle, double EndAngle)

Herror T_gen_ellipse_sector(Hobject* EllipseSector, const Htuple Row, const Htuple Column, const Htuple Phi, const Htuple Radius1, const Htuple Radius2, const Htuple StartAngle, const Htuple EndAngle)

void GenEllipseSector(HObject* EllipseSector, const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Radius1, const HTuple& Radius2, const HTuple& StartAngle, const HTuple& EndAngle)

void HRegion::HRegion(const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Radius1, const HTuple& Radius2, const HTuple& StartAngle, const HTuple& EndAngle)

void HRegion::HRegion(double Row, double Column, double Phi, double Radius1, double Radius2, double StartAngle, double EndAngle)

void HRegion::GenEllipseSector(const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Radius1, const HTuple& Radius2, const HTuple& StartAngle, const HTuple& EndAngle)

void HRegion::GenEllipseSector(double Row, double Column, double Phi, double Radius1, double Radius2, double StartAngle, double EndAngle)

static void HOperatorSet.GenEllipseSector(out HObject ellipseSector, HTuple row, HTuple column, HTuple phi, HTuple radius1, HTuple radius2, HTuple startAngle, HTuple endAngle)

public HRegion(HTuple row, HTuple column, HTuple phi, HTuple radius1, HTuple radius2, HTuple startAngle, HTuple endAngle)

public HRegion(double row, double column, double phi, double radius1, double radius2, double startAngle, double endAngle)

void HRegion.GenEllipseSector(HTuple row, HTuple column, HTuple phi, HTuple radius1, HTuple radius2, HTuple startAngle, HTuple endAngle)

void HRegion.GenEllipseSector(double row, double column, double phi, double radius1, double radius2, double startAngle, double endAngle)

Description

The operator gen_ellipse_sectorgen_ellipse_sectorGenEllipseSectorGenEllipseSectorGenEllipseSector generates one or more ellipse sectors with the center (RowRowRowRowrow, ColumnColumnColumnColumncolumn), the orientation PhiPhiPhiPhiphi, the half-radii Radius1Radius1Radius1Radius1radius1 and Radius2Radius2Radius2Radius2radius2, and the start and end angles StartAngleStartAngleStartAngleStartAnglestartAngle and EndAngleEndAngleEndAngleEndAngleendAngle. The angles are given in radians in mathematically positive direction. An illustration showing this can be found in the reference of gen_circle_sectorgen_circle_sectorGenCircleSectorGenCircleSectorGenCircleSector. Note, 'rad(360)'"rad(360)""rad(360)""rad(360)""rad(360)" is equivalent to 0. As a consequence a sector with StartAngleStartAngleStartAngleStartAnglestartAngle = 0 and EndAngleEndAngleEndAngleEndAngleendAngle = 'rad(360)'"rad(360)""rad(360)""rad(360)""rad(360)" results in an empty region. 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_systemget_systemGetSystemGetSystemGetSystem and reset_obj_dbreset_obj_dbResetObjDbResetObjDbResetObjDb 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_systemset_systemSetSystemSetSystemSetSystem).

Execution Information

Parameters

EllipseSectorEllipseSectorEllipseSectorEllipseSectorellipseSector (output_object)  region(-array) objectHRegionHRegionHobject *

Created ellipse(s).

RowRowRowRowrow (input_control)  coordinates.y(-array) HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

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 Row Row Row row ≤ 1024.0 (lin)

Minimum increment: 1.0

Recommended increment: 10.0

ColumnColumnColumnColumncolumn (input_control)  coordinates.x(-array) HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

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 Column Column Column column ≤ 1024.0 (lin)

Minimum increment: 1.0

Recommended increment: 10.0

PhiPhiPhiPhiphi (input_control)  angle.rad(-array) HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

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 Phi Phi Phi phi ≤ 1.570796 (lin)

Restriction: - pi / 2 <= Phi <= pi / 2

Radius1Radius1Radius1Radius1radius1 (input_control)  number(-array) HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

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 Radius1 Radius1 Radius1 radius1 ≤ 1024.0 (lin)

Minimum increment: 1.0

Recommended increment: 10.0

Restriction: Radius1 > 0

Radius2Radius2Radius2Radius2radius2 (input_control)  number(-array) HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

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 Radius2 Radius2 Radius2 radius2 ≤ 1024.0 (lin)

Minimum increment: 1.0

Recommended increment: 10.0

Restriction: Radius2 > 0 && Radius2 <= Radius1

StartAngleStartAngleStartAngleStartAnglestartAngle (input_control)  angle.rad(-array) HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

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 StartAngle StartAngle StartAngle startAngle ≤ 6.28318 (lin)

Restriction: 0 <= StartAngle && StartAngle <= 2 * pi

EndAngleEndAngleEndAngleEndAngleendAngle (input_control)  angle.rad(-array) HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

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 EndAngle EndAngle EndAngle endAngle ≤ 6.28318 (lin)

Restriction: 0 <= EndAngle && EndAngle <= 2 * pi

Example (HDevelop)

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)

Complexity

Runtime complexity: O(Radius1Radius1Radius1Radius1radius1 * 2)

Storage complexity (byte): O(Radius1Radius1Radius1Radius1radius1 * 8)

Result

If the parameter values are correct, the operator gen_ellipsegen_ellipseGenEllipseGenEllipseGenEllipse 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'>)set_system("clip_region",<"true"/"false">)SetSystem("clip_region",<"true"/"false">)SetSystem("clip_region",<"true"/"false">)SetSystem("clip_region",<"true"/"false">).

Possible Successors

paint_regionpaint_regionPaintRegionPaintRegionPaintRegion, reduce_domainreduce_domainReduceDomainReduceDomainReduceDomain

Alternatives

gen_circlegen_circleGenCircleGenCircleGenCircle, gen_circle_sectorgen_circle_sectorGenCircleSectorGenCircleSectorGenCircleSector, gen_region_polygon_filledgen_region_polygon_filledGenRegionPolygonFilledGenRegionPolygonFilledGenRegionPolygonFilled, draw_ellipsedraw_ellipseDrawEllipseDrawEllipseDrawEllipse, gen_ellipsegen_ellipseGenEllipseGenEllipseGenEllipse

See also

disp_ellipsedisp_ellipseDispEllipseDispEllipseDispEllipse, set_shapeset_shapeSetShapeSetShapeSetShape, smallest_circlesmallest_circleSmallestCircleSmallestCircleSmallestCircle, reduce_domainreduce_domainReduceDomainReduceDomainReduceDomain

Module

Foundation