	SUBROUTINE ZOOM(IDS,IDL,DIST,NN)
      LOGICAL B1,B2,B3,B4,B5,B6,B7,B8,B9,F
      COMMON/EYCEP/EYE(3),CEN(3),UP(3)
	COMMON/PULDAT/N
      COMMON/BULK/I3STRT,I3END,OBJ(6,32)
      COMMON/PAINT/I2STRT,I2END,PIC(4,32)
      COMMON/OIL/IVECT(200)
      COMMON/LIMITS/XMIN,XMAX,YMIN,YMAX
      DATA B1,B2,B3,B4,B5,B6,B7,B8,B9/9*.FALSE./
	DATA EYEFOR,D1,D2/5H(1X,1,5H9HEYE,5H1 EYE/
	DATA D3,D4,D5/5H2 EYE,5H3 DIS,2HT)/
      DATA FORM, F2/5H(1X,4,5HF5.1)/
      DATA ENFOR,EN2,EN3/5H(1X,2,5HHN=,I,2H5)/
      CALL BUTTON(1)
510   FORMAT(5F5.1)
511   FORMAT(1X,24HSTEP EYE1 EYE2 EYE3 DIST)
      CALL TEXT(0,0,0,0,0)
      CALL TEXT(400,20,7,1,EYEFOR)
      CALL TEXT(400,0,7,1,FORM,EYE(1),EYE(2),EYE(3),DIST)
      CALL TEXT(500,1000,7,1,ENFOR,NN)
      CALL ROTMAP(IDS,IDL,DIST)
101   B1=.FALSE.
      B2=.FALSE.
      B3=.FALSE.
      B4=.FALSE.
      CALL BUTTON(3,B1,B2,B3,B4)
111   CALL BUTTON(2,B1,B2,B3,B4)
      IF(B1) GO TO 121
      IF(B2) GO TO 122
      IF(B3) GO TO 125
      IF(B4) GO TO 124
      GO TO 111
124   WRITE(4,511)
      READ(4,510) ST,E1,E2,E3,DI
      DX=(EYE(1)-E1)/ST
      DY=(EYE(2)-E2)/ST
      DZ=(EYE(3)-E3)/ST
      DD=(DIST-DI)/ST
      IE=ST
      DO 102 K=1,IE
      EYE(1)=EYE(1)-DX
      EYE(3)=EYE(3)-DZ
      EYE(2)=EYE(2)-DY
      DIST=DIST-DD
      CALL ROTMAP(IDS,IDL,DIST)
102   CONTINUE
      RETURN
121   RX=1.0
      GO TO 10
122   RX=2.0
      GO TO 10
125   RX=50.0
10    B1=.FALSE.
      B2=.FALSE.
      B3=.FALSE.
      B4=.FALSE.
      B5=.FALSE.
      B6=.FALSE.
      B7=.FALSE.
      B8=.FALSE.
      B9=.FALSE.
      CALL BUTTON(3,B1,B2,B3,B4,B5,B6,B7,B8,B9)
11    DX=0
      DY=0
      DZ=0
      DD=0
      CALL TEXT(0,0,0,0,0)
      CALL TEXT(400,20,7,1,EYEFOR)
      CALL TEXT(400,0,7,1,FORM,EYE(1),EYE(2),EYE(3),DIST)
      CALL TEXT(500,1000,7,1,ENFOR,NN)
2     CALL BUTTON(2,B1,B2,B3,B4,B5,B6,B7,B8,B9)
       IF(B1) DX=0.1*RX
      IF(B2) DY=0.1*RX
      IF(B3) DZ=0.1*RX
      IF(B4) DD=0.1*RX
      IF(B6) DX=-0.1*RX
      IF(B7) DY=-0.1*RX
      IF(B8) DZ=-0.1*RX
      IF(B9) DD=-0.1*RX
      IF(B5) GO TO 101
      IF(B1.AND.B6) GO TO 12
	IF(B2.AND.B7) RETURN
      EYE(1)=EYE(1)+DX
      EYE(2)=EYE(2)+DY
      EYE(3)=EYE(3)+DZ
      DIST=DIST+DD
      CALL ROTMAP(IDS,IDL,DIST)
      DO 13 K=1,4
      CALL PULSE(N,N)
13    NN=NN+1
      GO TO 11
12    EYE(1)=0
	EYE(2)=0
	EYE(3)=10.0
	DIST=8.0
	GO TO 10
	END
	
