gen_ellipse_contour_xldgen_ellipse_contour_xldGenEllipseContourXldGenEllipseContourXldGenEllipseContourXld creates one or more elliptic arcs or
closed ellipses. Ellipses are specified by their center
(RowRowRowRowrow, ColumnColumnColumnColumncolumn), the orientation of the main axis
PhiPhiPhiPhiphi, the length of the larger half axis
Radius1Radius1Radius1Radius1radius1, and the length of the smaller half
axis Radius2Radius2Radius2Radius2radius2.
In addition to that, elliptic arcs are characterized by the angle
of the start point StartPhiStartPhiStartPhiStartPhistartPhi, the angle of the end point
EndPhiEndPhiEndPhiEndPhiendPhi, and the point order PointOrderPointOrderPointOrderPointOrderpointOrder along the
boundary.
Both the angle of the start point and the angle of the end point are
measured from the positive main axis specified with PhiPhiPhiPhiphi.
They correspond to the smallest surrounding circle of the ellipse.
The actual start and end point of the ellipse is the intersection of
the ellipse with the orthogonal projection of the corresponding circle
point onto the main axis.
Both angles refer to the coordinate system of the ellipse, i.e.
relative to the main axis and in a mathematical positive direction.
Thus, the two main poles correspond to the angles 0 and
, the two minor poles to the angles
and . To create a closed ellipse
the values 0 and (with positive
point order) have to be passed to the operator. All angles PhiPhiPhiPhiphi,
StartPhiStartPhiStartPhiStartPhistartPhi, EndPhiEndPhiEndPhiEndPhiendPhi take arbitrary values and are mapped
internally to the interval .
The resolution of the resulting contours ContEllipseContEllipseContEllipseContEllipsecontEllipse is
controlled via ResolutionResolutionResolutionResolutionresolution containing the maximum Euclidean
distance between neighboring contour points. The resolution is set
to the smallest valid value, if the input value falls below this
value.
draw_ellipse(WindowHandle,Row,Column,Phi,Radius1,Radius2)
gen_ellipse_contour_xld(Ellipse,Row,Column,Phi,Radius1,Radius2,0,6.28319, \
'positive',1.5)
length_xld(Ellipse,Length)
* Transform StartPhi so that the start point of the ellipse actually
* intersects the line through origin at the angle StartPhi measured from
* the positive main axis
affine_trans_point_2d ([1.0,0.0,0.0,0.0,1.0*Radius2/Radius1,0.0], \
sin(StartPhi), cos(StartPhi), Qx, Qy)
StartPhiEllipse := atan2(Qx,Qy)
draw_ellipse(WindowHandle,Row,Column,Phi,Radius1,Radius2)
gen_ellipse_contour_xld(Ellipse,Row,Column,Phi,Radius1,Radius2,0,6.28319, \
'positive',1.5)
length_xld(Ellipse,Length)
* Transform StartPhi so that the start point of the ellipse actually
* intersects the line through origin at the angle StartPhi measured from
* the positive main axis
affine_trans_point_2d ([1.0,0.0,0.0,0.0,1.0*Radius2/Radius1,0.0], \
sin(StartPhi), cos(StartPhi), Qx, Qy)
StartPhiEllipse := atan2(Qx,Qy)
draw_ellipse(WindowHandle,Row,Column,Phi,Radius1,Radius2)
gen_ellipse_contour_xld(Ellipse,Row,Column,Phi,Radius1,Radius2,0,6.28319, \
'positive',1.5)
length_xld(Ellipse,Length)
* Transform StartPhi so that the start point of the ellipse actually
* intersects the line through origin at the angle StartPhi measured from
* the positive main axis
affine_trans_point_2d ([1.0,0.0,0.0,0.0,1.0*Radius2/Radius1,0.0], \
sin(StartPhi), cos(StartPhi), Qx, Qy)
StartPhiEllipse := atan2(Qx,Qy)
draw_ellipse(WindowHandle,Row,Column,Phi,Radius1,Radius2)
gen_ellipse_contour_xld(Ellipse,Row,Column,Phi,Radius1,Radius2,0,6.28319, \
'positive',1.5)
length_xld(Ellipse,Length)
* Transform StartPhi so that the start point of the ellipse actually
* intersects the line through origin at the angle StartPhi measured from
* the positive main axis
affine_trans_point_2d ([1.0,0.0,0.0,0.0,1.0*Radius2/Radius1,0.0], \
sin(StartPhi), cos(StartPhi), Qx, Qy)
StartPhiEllipse := atan2(Qx,Qy)
gen_ellipse_contour_xldgen_ellipse_contour_xldGenEllipseContourXldGenEllipseContourXldGenEllipseContourXld returns 2 (H_MSG_TRUE) if all parameter values
are correct. If necessary, an exception is raised.