subroutine arc6(rad,bang,ang) C C This subroutine draws an arc starting at the present pen position C and leaves the pen down at the end of the arc. C C RAD(real)=radius of the arc in inches C BANG(real)=beginning angle in degrees C ANG(real)=number of degrees in the arc C +ve numbers: arc is drawn counter-clockwise C -ve numbers: arc is drawn clockwise C C The arc is drawn from the current pen position through C the desired angles. The pen is left down at the end of the arc. C COMMON/INIT/ILUN,FACTOR,IMODE,IPENST COMMON/ORIGIN/XOR,YOR PI=3.14159 ILDMD=IMODE !save current plotting mode CALL SPMODE(0) !goto absolute mode REALV=FACTOR*88.25 !conversion factor into screen coords. THINC=PI/180. !trig functions need radian args FANG=(BANG+ANG)*THINC !eding angle in radians THETA=BANG*THINC !beginning angle in radians CALL WHERE(X,Y,FACT) !get the current location,factor XCENTR=X-RAD*COS(THETA) !calculate the center of the arc YCENTR=Y-RAD*SIN(THETA) XC=(XOR+XCENTR)*REALV !convert to screen co-ordinates YC=(YOR+YCENTR)*REALV EXPT=((XOR+XCENTR)*COS(FANG))*REALV !get position at end of arc EYPT=((YOR+YCENTR)*SIN(FANG))*REALV WRITE(ILUN,10)ANG,XC,YC 10 FORMAT(' C(A'F'C) ['F','F']') CALL PLOT(EXPT,EYPT,0) !update pen position CALL SPMODE(ILDMD) !reset plotting mode RETURN !yes,let's get out of here END