C SPIROGRAPH PLOT PROGRAM 10 WRITE(4,100) 100 FORMAT(1X,"ENTER FIXED CIRCLE RADIUS") READ(4,110) R1 110 FORMAT(I6) WRITE(4,120) 120 FORMAT(1X,"ENTER MOVING CIRCLE RADIUS") READ(4,110) R2 WRITE(4,140) 140 FORMAT(1X,"ENTER PEN OFFSET") READ(4,110) P WRITE(4,160) 160 FORMAT(1X,"0 = MOVING INSIDE, 1 = MOVING OUTSIDE") READ(4,110) ITYPE THETA=0 IASK=500 J=-1 IF (ITYPE .GT. 0) GO TO 280 180 J=J+1 I=0 200 PHI=(R1-R2)/R2*THETA X=(R1-R2)*COS(THETA)+P*COS(PHI) Y=(R1-R2)*SIN(THETA)-P*SIN(PHI) CALL AXPLT(X,Y) THETA=THETA+.2 I=I+1 IF (I .LT. IASK) GO TO 200 WRITE(4,220) 220 FORMAT(1X,"1 = CONTINUE") READ(4,110) ICONT IF (ICONT .EQ. 1) GO TO 180 GO TO 400 280 J=J+1 I=0 300 PHI=(R1+R2)/R2*THETA X=(R1+R2)*COS(THETA)-P*COS(PHI) Y=(R1+R2)*SIN(THETA)-P*SIN(PHI) CALL AXPLT(X,Y) THETA=THETA+.2 I=I+1 IF (I .LT. IASK) GO TO 300 WRITE(4,220) READ(4,110) ICONT IF (ICONT .EQ. 1) GO TO 280 400 WRITE(4,410) 410 FORMAT(1X,"1 = PLOT") READ(4,110) ICONT IF (ICONT .NE. 1) GO TO 10 CALL PLOTS(.005*512/7.5,1) IPEN=3 IPNTS=J*IASK+I WRITE(4,110) IPNTS IF (ITYPE .GT. 0) GO TO 450 DO 420 I=1,IPNTS PHI=(R1-R2)/R2*THETA X=(R1-R2)*COS(THETA)+P*COS(PHI) Y=(R1-R2)*SIN(THETA)-P*SIN(PHI) CALL XYPLOT(X,Y,IPEN) IPEN=2 THETA=THETA+.1 420 CONTINUE GO TO 10 450 DO 460 I=1,IPNTS PHI=(R1+R2)/R2*THETA X=(R1+R2)*COS(THETA)-P*COS(PHI) Y=(R1+R2)*SIN(THETA)-P*SIN(PHI) CALL XYPLOT(X,Y,IPEN) IPEN=2 THETA=THETA+.1 460 CONTINUE GO TO 10 600 END