Skip to content

get_points_ellipseGetPointsEllipseGetPointsEllipseget_points_ellipseget_points_ellipse🔗

Short description🔗

get_points_ellipseGetPointsEllipseGetPointsEllipseget_points_ellipseget_points_ellipse — Calculate points on the perimeter of an ellipse.

Signature🔗

get_points_ellipse( angle.rad Angle, ellipse.center.y Row, ellipse.center.x Column, ellipse.angle.rad Phi, ellipse.radius1 Radius1, ellipse.radius2 Radius2, out point.y RowPoint, out point.x ColPoint )void GetPointsEllipse( const HTuple& Angle, const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Radius1, const HTuple& Radius2, HTuple* RowPoint, HTuple* ColPoint )static void HOperatorSet.GetPointsEllipse( HTuple angle, HTuple row, HTuple column, HTuple phi, HTuple radius1, HTuple radius2, out HTuple rowPoint, out HTuple colPoint )def get_points_ellipse( angle: MaybeSequence[float], row: float, column: float, phi: float, radius_1: float, radius_2: float ) -> Tuple[Sequence[float], Sequence[float]]

def get_points_ellipse_s( angle: MaybeSequence[float], row: float, column: float, phi: float, radius_1: float, radius_2: float ) -> Tuple[float, float]Herror get_points_ellipse( double Angle, double Row, double Column, double Phi, double Radius1, double Radius2, double* RowPoint, double* ColPoint )

Herror T_get_points_ellipse( const Htuple Angle, const Htuple Row, const Htuple Column, const Htuple Phi, const Htuple Radius1, const Htuple Radius2, Htuple* RowPoint, Htuple* ColPoint )

static void HMisc::GetPointsEllipse( const HTuple& Angle, double Row, double Column, double Phi, double Radius1, double Radius2, HTuple* RowPoint, HTuple* ColPoint )

static void HMisc::GetPointsEllipse( double Angle, double Row, double Column, double Phi, double Radius1, double Radius2, double* RowPoint, double* ColPoint )

static void HMisc.GetPointsEllipse( HTuple angle, double row, double column, double phi, double radius1, double radius2, out HTuple rowPoint, out HTuple colPoint )

static void HMisc.GetPointsEllipse( double angle, double row, double column, double phi, double radius1, double radius2, out double rowPoint, out double colPoint )

Description🔗

get_points_ellipseGetPointsEllipse returns the point (RowPointrowPointrow_point,ColPointcolPointcol_point) on the specified ellipse corresponding to the angle in Angleangleangle. With the parameter Angleangleangle you are setting the eccentric anomaly, which denotes the angle used for the parametric equation (see the figure below) and refers to the main axis of the ellipse. The ellipse itself is characterized by the center (Rowrowrow, Columncolumncolumn), the orientation of the main axis Phiphiphi relative to the horizontal axis, the length of the larger (Radius1radius1radius_1) and the smaller half axis (Radius2radius2radius_2). The angles are measured counter clockwise in radiant.

The point P with its coordinates RowPointrowPointrow_point and ColPointcolPointcol_point belongs to the ellipse (orange). It is determined over the angle a and the lengths of the half axis r1 (Radius1radius1radius_1) and r2 (Radius2radius2radius_2). For simplicity of the visualization and angle Phiphiphi=00 was used.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

Angleangleangle (input_control) angle.rad(-array) → (real)HTuple (double)HTuple (double)MaybeSequence[float]Htuple (double)

Angle corresponding to the resulting point [rad].

Default: 00
Restriction: Angle >= 0 && Angle <= 6.283185307

Rowrowrow (input_control) ellipse.center.y → (real)HTuple (double)HTuple (double)floatHtuple (double)

Row coordinate of the center of the ellipse.

Columncolumncolumn (input_control) ellipse.center.x → (real)HTuple (double)HTuple (double)floatHtuple (double)

Column coordinate of the center of the ellipse.

Phiphiphi (input_control) ellipse.angle.rad → (real)HTuple (double)HTuple (double)floatHtuple (double)

Orientation of the main axis [rad].

Restriction: Phi >= 0 && Phi <= 6.283185307

Radius1radius1radius_1 (input_control) ellipse.radius1 → (real)HTuple (double)HTuple (double)floatHtuple (double)

Length of the larger half axis.

Restriction: Radius1 > 0

Radius2radius2radius_2 (input_control) ellipse.radius2 → (real)HTuple (double)HTuple (double)floatHtuple (double)

Length of the smaller half axis.

Restriction: Radius2 >= 0

RowPointrowPointrow_point (output_control) point.y(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Row coordinate of the point on the ellipse.

ColPointcolPointcol_point (output_control) point.x(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Column coordinates of the point on the ellipse.

Example🔗

(HDevelop)


draw_ellipse(WindowHandle,Row,Column,Phi,Radius1,Radius2)
get_points_ellipse([0,3.14],Row,Column,Phi,Radius1,Radius2,\
                   RowPoint,ColPoint)

Result🔗

get_points_ellipseGetPointsEllipse returns 2 (H_MSG_TRUE) if all parameter values are correct. If necessary, an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

fit_ellipse_contour_xldFitEllipseContourXld, draw_ellipseDrawEllipse, gen_ellipse_contour_xldGenEllipseContourXld

See also

gen_ellipse_contour_xldGenEllipseContourXld

Module🔗

Foundation