GEOarcFrom2PointsAndRadius |
Top Previous Next |
Calculation of centre, beginning corner and final corner of an arc. This function calculates from the Beginning, terminator point and the radius of an arc as well as an Indikatorflag his centre and the beginning corner and final corner. The arc runs from the Beginning to the terminator point in mathematically to positive ones Senses (against the clockwise). Parametre xa (STANDS IN) [IN] ya (STANDS IN) [IN] Starting point of the arc xe (STANDS IN) [IN] ye (STANDS IN) [IN] Terminator point of the arc r (STANDS IN) [IN] Radius of the arc flag (STANDS IN) [IN] Indicator whether the smaller one of two possible arcs (flag =-1) or bigger (flag=1) should be calculated. xc (STANDS IN *) [OUT] Calculated x co-ordinate of the centre of a circle. yc (STANDS IN *) [OUT] Calculated Y co-ordinate of the centre of a circle. alpha (STANDS IN *) [OUT] Calculated start corner in Radiant, value area from 0 to 2 Pi. beta (STANDS IN *) [OUT] Calculated final corner in Radiant, value area from 0 to 2 Pi. Result (int) [OUT] 0 - OK: successful calculation -1 - Mistake: Calculation not possibly. Declaration #include "basic.h2
int DLLENTRY GEOarcFrom2PointsAndRadius ( STAND-IN xa, STAND-IN ya, STAND-IN xe, STAND-IN ye, STAND-IN r, STAND-IN flag, STAND-IN * xc, STAND-IN * yc, STAND-IN * alpha, STAND-IN * beta ); Example status = GEOarcFrom2PointsAndRadius (-200.0, 100.0, 100.0, 400.0, 300.0, 1, &xc, &yc, &alpha, &beta); The variable status receives the value 0, i.e. the calculation could be carried out. The centre lies with (100/100) of the beginning corners (alpha ) has the value Pi, the final corner (beta ) has the value Pi/2. status = GEOarcFrom2PointsAndRadius (-200.0, 100.0, 100.0, 400.0, 300.0,-1, &xc, &yc, &alpha, &beta) The variable status receives the value 0, i.e. the calculation could be carried out. The centre lies with (-200/400) of the beginning corners (alpha ) has the value 3Pi / 2, the final corners (beta ) has the value 0.
|