CLEAR PrintCoords(30,60,10) PrintCoords(45,150,10) PrintCoords(300,80,10) PrintCoords(180,240,10) * params are the starting and ending angle in degrees, * and the radius of the larger circle. * this code assumes that the distance from angle1 to angle2 is not more than 180 deg. FUNCTION PrintCoords( tnAngle1, tnAngle2, tnRadius ) DIMENSION aCoords[6,2] LOCAL nPoints nPoints = 4 aCoords[1,1] = 0 aCoords[1,2] = 0 aCoords[2,1] = COS(DTOR(tnAngle1)) * tnRadius aCoords[2,2] = -SIN(DTOR(tnAngle1)) * tnRadius aCoords[3,1] = IIF( tnAngle1 >= 90 AND tnAngle1 < 270, -tnRadius, tnRadius ) aCoords[3,2] = IIF( tnAngle1 < 180, -tnRadius, tnRadius ) IF INT(tnAngle1/90) # INT(tnAngle2/90) nPoints = 5 aCoords[4,1] = IIF( tnAngle1 < 180, -tnRadius, tnRadius ) aCoords[4,2] = IIF( tnAngle1 >= 270 OR tnAngle1 < 90, -tnRadius, tnRadius ) IF ( INT(tnAngle1/90) + 1 ) % 4 # INT(tnAngle2/90) nPoints = 6 aCoords[5,1] = IIF( tnAngle1 >= 90 AND tnAngle1 < 270, tnRadius, -tnRadius ) aCoords[5,2] = IIF( tnAngle1 < 180, tnRadius, -tnRadius ) ENDIF ENDIF aCoords[nPoints,1] = COS(DTOR(tnAngle2)) * tnRadius aCoords[nPoints,2] = -SIN(DTOR(tnAngle2)) * tnRadius FOR ii = 1 TO nPoints ? "(" + TRANSFORM(aCoords[ii,1]) + "," + TRANSFORM(aCoords[ii,2]) + ")" ENDFOR ? "" ENDFUNC