gen_ellipse_sectorgen_ellipse_sectorGenEllipseSectorGenEllipseSectorgen_ellipse_sector (Operator)

Name

gen_ellipse_sectorgen_ellipse_sectorGenEllipseSectorGenEllipseSectorgen_ellipse_sector — Erzeugen eines Ellipsenausschnittes.

Signatur

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)

def gen_ellipse_sector(row: MaybeSequence[Union[int, float]], column: MaybeSequence[Union[int, float]], phi: MaybeSequence[Union[int, float]], radius_1: MaybeSequence[Union[int, float]], radius_2: MaybeSequence[Union[int, float]], start_angle: MaybeSequence[Union[int, float]], end_angle: MaybeSequence[Union[int, float]]) -> HObject

Beschreibung

gen_ellipse_sectorgen_ellipse_sectorGenEllipseSectorGenEllipseSectorGenEllipseSectorgen_ellipse_sector generiert eine oder mehrere Ellipsen mit dem Schwerpunkt (RowRowRowRowrowrow, ColumnColumnColumnColumncolumncolumn), der Orientierung PhiPhiPhiPhiphiphi, den Halbradien Radius1Radius1Radius1Radius1radius1radius_1 und Radius2Radius2Radius2Radius2radius2radius_2 und den Start- und End-winkeln StartAngleStartAngleStartAngleStartAnglestartAnglestart_angle and EndAngleEndAngleEndAngleEndAngleendAngleend_angle. Der Winkel wird in Bogenmaß in mathematisch positivem Drehsinn angegeben. Eine Illustration zu den Winkeln kann bei dem Operator gen_circle_sectorgen_circle_sectorGenCircleSectorGenCircleSectorGenCircleSectorgen_circle_sector gefunden werden. Der Wert 'rad(360)'"rad(360)""rad(360)""rad(360)""rad(360)""rad(360)" ist äquivalent zu 0. Entsprechend ergibt ein Sektor mit StartAngleStartAngleStartAngleStartAnglestartAnglestart_angle = 0 und EndAngleEndAngleEndAngleEndAngleendAngleend_angle = 'rad(360)'"rad(360)""rad(360)""rad(360)""rad(360)""rad(360)" eine leere Region. Es kann mehr als eine Region erzeugt werden, indem Tupel von Parameterwerten übergeben werden.

Der Schwerpunkt muss innerhalb der Bildkoordinaten liegen. Das Koordinatensystem läuft von (0,0) (linkes oberes Eck) bis (Width-1,Height-1). Siehe hierzu auch get_systemget_systemGetSystemGetSystemGetSystemget_system und reset_obj_dbreset_obj_dbResetObjDbResetObjDbResetObjDbreset_obj_db. Falls die Ellipse über den Bildrand reicht, wird je nach dem Wert des Systemflags 'clip_region' (set_systemset_systemSetSystemSetSystemSetSystemset_system) die Ellipse auf das aktuelle Bildformat beschnitten.

Ausführungsinformationen

Parameter

EllipseSectorEllipseSectorEllipseSectorEllipseSectorellipseSectorellipse_sector (output_object)  region(-array) objectHRegionHObjectHRegionHobject *

Erzeugte Ellipse(n).

RowRowRowRowrowrow (input_control)  coordinates.y(-array) HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Zeilenindex des Schwerpunktes.

Defaultwert: 200.0

Wertevorschläge: 0.0, 10.0, 20.0, 50.0, 100.0, 256.0, 300.0, 400.0

Typischer Wertebereich: 1.0 ≤ Row Row Row Row row row ≤ 1024.0 (lin)

Minimale Schrittweite: 1.0

Empfohlene Schrittweite: 10.0

ColumnColumnColumnColumncolumncolumn (input_control)  coordinates.x(-array) HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Spaltenindex des Schwerpunktes.

Defaultwert: 200.0

Wertevorschläge: 0.0, 10.0, 20.0, 50.0, 100.0, 256.0, 300.0, 400.0

Typischer Wertebereich: 1.0 ≤ Column Column Column Column column column ≤ 1024.0 (lin)

Minimale Schrittweite: 1.0

Empfohlene Schrittweite: 10.0

PhiPhiPhiPhiphiphi (input_control)  angle.rad(-array) HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Orientierung des längeren Radius (Radius1).

Defaultwert: 0.0

Wertevorschläge: -1.5707, -1.1781, -0.785398, -0.392699, 0.0, 0.392699, 0.785398, 1.1781, 1.5707

Typischer Wertebereich: -1.570796 ≤ Phi Phi Phi Phi phi phi ≤ 1.570796 (lin)

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

Radius1Radius1Radius1Radius1radius1radius_1 (input_control)  number(-array) HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Längerer Radius.

Defaultwert: 100.0

Wertevorschläge: 2.0, 5.0, 10.0, 20.0, 50.0, 100.0, 256.0, 300.0, 400.0

Typischer Wertebereich: 1.0 ≤ Radius1 Radius1 Radius1 Radius1 radius1 radius_1 ≤ 1024.0 (lin)

Minimale Schrittweite: 1.0

Empfohlene Schrittweite: 10.0

Restriktion: Radius1 > 0

Radius2Radius2Radius2Radius2radius2radius_2 (input_control)  number(-array) HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Kürzerer Radius.

Defaultwert: 60.0

Wertevorschläge: 1.0, 2.0, 4.0, 5.0, 10.0, 20.0, 50.0, 100.0, 256.0, 300.0, 400.0

Typischer Wertebereich: 1.0 ≤ Radius2 Radius2 Radius2 Radius2 radius2 radius_2 ≤ 1024.0 (lin)

Minimale Schrittweite: 1.0

Empfohlene Schrittweite: 10.0

Restriktion: Radius2 > 0 && Radius2 <= Radius1

StartAngleStartAngleStartAngleStartAnglestartAnglestart_angle (input_control)  angle.rad(-array) HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Startwinkel des Ellipsenausschnittes.

Defaultwert: 0.0

Wertevorschläge: 0.0, 0.785398, 1.5708, 2.35619, 3.14159, 3.92699, 4.71239, 5.49779, 6.28318

Typischer Wertebereich: 0 ≤ StartAngle StartAngle StartAngle StartAngle startAngle start_angle ≤ 6.28318 (lin)

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

EndAngleEndAngleEndAngleEndAngleendAngleend_angle (input_control)  angle.rad(-array) HTupleMaybeSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Endwinkel des Ellipsenausschnittes.

Defaultwert: 3.14159

Wertevorschläge: 0.0, 0.785398, 1.5708, 2.35619, 3.14159, 3.92699, 4.71239, 5.49779, 6.28318

Typischer Wertebereich: 0 ≤ EndAngle EndAngle EndAngle EndAngle endAngle end_angle ≤ 6.28318 (lin)

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

Beispiel (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)

Komplexität

Laufzeitkomplexität: O(Radius1Radius1Radius1Radius1radius1radius_1 * 2)

Speicherplatzkomplexität (Byte): O(Radius1Radius1Radius1Radius1radius1radius_1 * 8)

Ergebnis

Sind die Parameterwerte korrekt, dann liefert gen_ellipsegen_ellipseGenEllipseGenEllipseGenEllipsegen_ellipse den Wert TRUE. Andernfalls wird eine Fehlerbehandlung durchgeführt. Das Clipping am aktuellen Bildformat wird durch set_system('clip_region',<'2 (H_MSG_TRUE)'/'3 (H_MSG_FALSE)'>)set_system("clip_region",<"2 (H_MSG_TRUE)"/"3 (H_MSG_FALSE)">)SetSystem("clip_region",<"2 (H_MSG_TRUE)"/"3 (H_MSG_FALSE)">)SetSystem("clip_region",<"2 (H_MSG_TRUE)"/"3 (H_MSG_FALSE)">)SetSystem("clip_region",<"2 (H_MSG_TRUE)"/"3 (H_MSG_FALSE)">)set_system("clip_region",<"2 (H_MSG_TRUE)"/"3 (H_MSG_FALSE)">) festgelegt.

Nachfolger

paint_regionpaint_regionPaintRegionPaintRegionPaintRegionpaint_region, reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain

Alternativen

gen_circlegen_circleGenCircleGenCircleGenCirclegen_circle, gen_circle_sectorgen_circle_sectorGenCircleSectorGenCircleSectorGenCircleSectorgen_circle_sector, gen_region_polygon_filledgen_region_polygon_filledGenRegionPolygonFilledGenRegionPolygonFilledGenRegionPolygonFilledgen_region_polygon_filled, draw_ellipsedraw_ellipseDrawEllipseDrawEllipseDrawEllipsedraw_ellipse, gen_ellipsegen_ellipseGenEllipseGenEllipseGenEllipsegen_ellipse

Siehe auch

disp_ellipsedisp_ellipseDispEllipseDispEllipseDispEllipsedisp_ellipse, set_shapeset_shapeSetShapeSetShapeSetShapeset_shape, smallest_circlesmallest_circleSmallestCircleSmallestCircleSmallestCirclesmallest_circle, reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain

Modul

Foundation