      LOGICAL LP
      COMMON/EYCEP/EYE(3),CEN(3),UP(3)
      COMMON/BULK/I3STRT,I3END,OBJ(6,30)
      COMMON/PAINT/I2STRT,I2END,PIC(4,30)
      COMMON/OIL/IVECT(200)
      COMMON/LIMITS/XMIN,XMAX,YMIN,YMAX
      DATA FORM, F2/5H(1X,4,5HF5.1)/
      DATA EYEFOR,D1,D2/5H(1X,1,5H9HEYE,5H1 EYE/
      DATA D3,D4,D5/5H2 EYE,5H3 DIS,2HT)/
      DATA STPFOR,S2,S3,S4/5H(1X,2,5H3HSTE,5HP 8.0,5H 12.0/
      DATA S5,S6,S7/5H 18.0,5H 24.0,1H)/
      DATA OPFOR,P2,P3/5H(1X,1,5H4HTO ,5HTC SO/
      DATA P4,P5/5H SC Z,2HM)/
      DATA DXFR,DX2,DX3,DX4,DX5/5H(1X,1,5H5HDX=,5H0.0 0,5H.5 -0,3H.5)/
      DATA DYFR,DY2,DY3,DY4,DY5/5H(1X,1,5H5HDY=,5H0.0 0,5H.5 -0,3H.5)/
      DATA DZFR,DZ2,DZ3,DZ4,DZ5/5H(1X,1,5H5HDZ=,5H0.0 0,5H.5 -0,3H.5)/
      DATA DDFR,DD2,DD3,DD4,DD5/5H(1X,1,5H5HDD=,5H0.0 0,5H.5 -0,3H.5)/
      DATA ENSFR,ED2,ED3,ED4/5H(1X,2,5H2HREV,5HISE R,5HETURN/
	DATA ED5,ED6/5H CONT,5HINUE)/
      DATA IDS,IDL/2,1/
      CALL CLEAR(.TRUE.)
	CALL DISPLY (0,4000,IGET)
      CALL SETPEN(ITAG,LP,IX,IY)
      I3STRT=1
      I3END=19
      XMIN=-5.0
      XMAX=5.0
      YMIN=-5.0
      YMAX=5.0
      READ(7,501)((OBJ(I,J),I=1,6),J=1,19)
 501  FORMAT (6F5.1)
      EYE(1)=0.0
      EYE(2)=0.0
      EYE(3)=10.0
      CEN(1)=0.0
      CEN(2)=0.0
      CEN(3)=0.0
      UP(1)=0.0
      UP(2)=10.0
      UP(3)=0.0
      DIST=8.0
      I2STRT=1
      I2END=19
      MODE=1
      CALL ROTER
      CALL MAPPER(DIST)
      CALL VECTOR(MODE,PIC,I2STRT,I2END,IVECT,1,LAST,7,0,0)
      CALL DISPLY(6,IDL,IVECT,1,LAST)
      CALL DISPLY(6,IDS,IVECT,1,LAST)
      CALL DISPLY(3,IDL)
      IH=IDS
      IDS=IDL
      IDL=IH
10    LP=.FALSE.
      CALL TEXT(0,0,0,0,0)
      CALL TEXT(100,100,7,1,STPFOR)
1     IF(.NOT.LP) GO TO 1
      IF(IX.LT.208) STEP=8.0
      IF(IX.GT.328) STEP=24.0
      IF(IX.GT.256) STEP=18.0
      IF(IX.GT.208) STEP=12.0
      LP=.FALSE.
      CALL TEXT(0,0,0,0,0)
      CALL TEXT(100,200,7,1,OPFOR)
2     IF(.NOT.LP) GO TO 2
      IF(IX.GT.244) GO TO 93
      IF(IX.GT.208) GO TO 53
      IF(IX.GT.172) GO TO 52
      IF(IX.GT.136) GO TO 51
      IF(IX.GT.100) GO TO 50
 50    ISTEP=STEP
      CALL TEXT(0,0,0,0,0)
      DO 20 K=1,ISTEP
      AK=K
	ANGR=1.5708*AK/STEP
      D7Y=2.0*SIN(ANGR)
      D7Z=-2.0*COS(ANGR)
      D9Z=D7Z*0.65
      D9Y=D7Y*0.65
      OBJ(5,8)=D7Y
      OBJ(5,7)=D7Y
      OBJ(6,7)=D7Z
      OBJ(6,8)=D7Z
      OBJ(6,9)=D9Z
      OBJ(5,9)=D9Y
      OBJ(2,10)=D7Y
      OBJ(5,10)=D7Y
      OBJ(3,10)=D7Z
      OBJ(6,10)=D7Z
      OBJ(6,11)=D9Z
      OBJ(3,11)=D9Z
      OBJ(2,11)=D9Y
      OBJ(5,11)=D9Y
      OBJ(2,12)=0.6*COS(ANGR)-0.6
      CALL ROTER
      CALL MAPPER(DIST)
      CALL VECTOR(1,PIC,I2STRT,I2END,IVECT,1,LAST,7,0,0)
      CALL DISPLY(6,IDS,IVECT,1,LAST)
      CALL DISPLY(3,IDL)
      IH=IDS
      IDS=IDL
      IDL=IH
 20   CONTINUE
      GO TO 10
 51    ISTEP=STEP
      CALL TEXT(0,0,0,0,0)
      DO 21 K=1,ISTEP
      AK=K
      ANGR=1.5708*AK/STEP
      D7YR=2.0*COS(ANGR)
      D7ZR=-2.0*SIN(ANGR)
      D9YR=D7YR*0.65
      D9ZR=D7ZR*0.65
      OBJ(5,7)=D7YR
      OBJ(5,8)=D7YR
      OBJ(6,8)=D7ZR
      OBJ(6,7)=D7ZR
      OBJ(6,9)=D9ZR
      OBJ(5,9)=D9YR
      OBJ(5,10)=D7YR
      OBJ(2,10)=D7YR
      OBJ(6,10)=D7ZR
      OBJ(3,10)=D7ZR
      OBJ(3,11)=D9ZR
      OBJ(6,11)=D9ZR
      OBJ(5,11)=D9YR
      OBJ(2,11)=D9YR
      OBJ(2,12)=0.6*SIN(ANGR)-0.6
      CALL ROTER
      CALL MAPPER(DIST)
      CALL VECTOR(1,PIC,I2STRT,I2END,IVECT,1,LAST,7,0,0)
      CALL DISPLY(6,IDS,IVECT,1,LAST)
      CALL DISPLY(3,IDL)
      IH=IDS
      IDS=IDL
       IDL=IH
21    CONTINUE
	GO TO 10
52    ISTEP=STEP
      CALL TEXT(0,0,0,0,0)
      DO 22 K=1,ISTEP
       AK=K
      ANGR=1.5708*AK/STEP
      D13X=2.0*SIN(ANGR)
      D13Z=-2.0*COS(ANGR)
      D15X=D13X*0.65
      D15Z=D13Z*0.65
      OBJ(4,13)=D13X
      OBJ(4,14)=D13X
      OBJ(4,16)=D13X
      OBJ(1,16)=D13X
      OBJ(6,16)=D13Z
      OBJ(3,16)=D13Z
      OBJ(6,14)=D13Z
      OBJ(6,13)=D13Z
      OBJ(6,15)=D15Z
      OBJ(6,17)=D15Z
      OBJ(3,17)=D15Z
      OBJ(1,17)=D15X
      OBJ(4,17)=D15X
      OBJ(4,15)=D15X
      OBJ(4,18)=0.9*COS(ANGR)-0.9
      CALL ROTER
      CALL MAPPER(DIST)
      CALL VECTOR(1,PIC,I2STRT,I2END,IVECT,1,LAST,7,0,0)
      CALL DISPLY(6,IDS,IVECT,1,LAST)
      CALL DISPLY(3,IDL)
      IH=IDS
      IDS=IDL
      IDL=IH
22    CONTINUE
      GO TO 10
53    ISTEP=STEP
      CALL TEXT(0,0,0,0,0)
      DO 23 K=1,ISTEP
       AK=K
      ANGR=1.5708*AK/STEP
      D13XR=2.0*COS(ANGR)
      D13ZR=-2.0*SIN(ANGR)
      D15XR=D13XR*0.65
      D15ZR=D13ZR*0.65
      OBJ(4,13)=D13XR
      OBJ(4,14)=D13XR
      OBJ(4,16)=D13XR
      OBJ(1,16)=D13XR
      OBJ(6,16)=D13ZR
      OBJ(3,16)=D13ZR
      OBJ(6,14)=D13ZR
      OBJ(6,13)=D13ZR
      OBJ(6,15)=D15ZR
      OBJ(6,17)=D15ZR
      OBJ(3,17)=D15ZR
      OBJ(1,17)=D15XR
      OBJ(4,17)=D15XR
      OBJ(4,15)=D15XR
      OBJ(4,18)=0.9*SIN(ANGR)-0.9
      CALL ROTER
      CALL MAPPER(DIST)
      CALL VECTOR(1,PIC,I2STRT,I2END,IVECT,1,LAST,7,0,0)
      CALL DISPLY(6,IDS,IVECT,1,LAST)
      CALL DISPLY(3,IDL)
      IH=IDS
      IDS=IDL
      IDL=IH
23    CONTINUE
      GO TO 10
93    LP=.FALSE.
      CALL TEXT(0,0,0,0,0)
      CALL TEXT(100,100,7,1,DXFR)
3     IF(.NOT.LP) GO TO 3
      IF(IX.LT.177) DX=0.0
      IF(IX.GT.177) DX=0.5
      IF(IX.GT.221) DX=-0.5
      LP=.FALSE.
      CALL TEXT(0,0,0,0,0)
      CALL TEXT(100,200,7,1,DYFR)
4     IF(.NOT.LP) GO TO 4
      IF(IX.LT.177) DY=0.0
      IF(IX.GT.177) DY=0.5
      IF(IX.GT.221) DY=-0.5
      LP=.FALSE.
      CALL TEXT(0,0,0,0,0)
      CALL TEXT(100,100,7,1,DZFR)
5     IF(.NOT.LP) GO TO 5
      IF(IX.LT.177) DZ=0.0
      IF(IX.GT.177) DZ=0.5
      IF(IX.GT.221) DZ=-0.5
      LP=.FALSE.
      CALL TEXT(0,0,0,0,0)
      CALL TEXT(100,200,7,1,DDFR)
6     IF(.NOT.LP) GO TO 6
      IF(IX.LT.177) DD=0.0
      IF(IX.GT.177) DD=0.5
      IF(IX.GT.221) DD=-0.5
99    EYE(1)=EYE(1)+DX
      EYE(2)=EYE(2)+DY
      EYE(3)=EYE(3)+DZ
      DIST=DIST+DD
      CALL TEXT(0,0,0,0,0)
      CALL TEXT(100,100,7,1,EYEFOR)
      CALL TEXT(100,50,7,1,FORM,EYE(1),EYE(2),EYE(3),DIST)
      CALL ROTER
      CALL MAPPER(DIST)
      CALL VECTOR(1,PIC,I2STRT,I2END,IVECT,1,LAST,7,0,0)
      CALL DISPLY(6,IDS,IVECT,1,LAST)
      CALL DISPLY(3,IDL)
      IH=IDS
      IDS=IDL
	IDL=IH
      LP=.FALSE.
      CALL TEXT(0,0,0,0,0)
	CALL TEXT(100,800,7,1,ENSFR)
7     IF(.NOT.LP) GO TO 7
      IF(IX.LT.191) GO TO 93
      IF(IX.GT.275) GO TO 99
	IF(IX.GT.191) GO TO 10
      STOP
      END
