      LOGICAL B1,B2,B3,B4,B5,B6,B7,B8,B9,B10
      DIMENSION FILE(2)
      COMMON/EYCEP/EYE(3),CEN(3),UP(3)
        COMMON/POINTS/INIT,PTS(6,31)
        COMMON/PULDAT/N
      COMMON/BULK/I3STRT,I3END,OBJ(6,31)
      COMMON/PAINT/I2STRT,I2END,PIC(4,31)
      COMMON/OIL/IVECT(200)
      COMMON/LIMITS/XMIN,XMAX,YMIN,YMAX
      DATA FILE(1),FILE(2)/4HCUBE,4H SRC/
      DATA FORM, F2/5H(1X,1,5HF5.1)/
      DATA SFOR,S2,S3/5H(1X,4,5HHSTEP,1H)/
      DATA ENFOR,EN2,EN3/5H(1X,2,5HHN=,I,2H4)/
      DATA IDS,IDL/2,1/
      CALL CLEAR(.TRUE.)
      CALL DISPLY (0,4000,IGET)
      CALL BUTTON(1)
      I3STRT=1
      I3END=31
      XMIN=-5.0
      XMAX=5.0
      YMIN=-5.0
      YMAX=5.0
      CALL SEEK (1,FILE)
      READ(1,501)((OBJ(I,J),I=1,6),J=1,31)
 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=31
      MODE=1
      M=0
      NN=0
      RO=0
      PI=0
      YA=0
      CALL ROTER
      CALL MAPPER(DIST)
      CALL VECTOR(1,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    CALL TEXT(0,0,0,0,0)
      CALL TEXT(800,800,7,1,ENFOR,NN)
      B1=.FALSE.
      B2=.FALSE.
      B3=.FALSE.
      B4=.FALSE.
      B5=.FALSE.
      B6=.FALSE.
      B7=.FALSE.
      B8=.FALSE.
      B9=.FALSE.
      B10=.FALSE.
      CALL BUTTON(3,B1,B2,B3,B4,B5,B6,B7,B8,B9,B10)
101   CALL BUTTON(2,B1,B2,B3,B4,B5,B6,B7,B8,B9,B10)
      IF(B1) GO TO 41
      IF(B2) GO TO 42
      IF(B3) GO TO 43
      IF(B4) GO TO 44
      IF(B5) GO TO 45
      IF(B6) GO TO 46
      IF(B7) GO TO 47
      IF(B8) GO TO 48
      IF(B9) GO TO 49
      IF(B10) GO TO 50
      GO TO 101
45    CALL ZOOM(IDS,IDL,DIST,NN)
        DO 99 J=1,48
      NN=NN+1
99    CALL PULSE(N,N)
      GO TO 10
50    CALL CENA(IDS,IDL,DIST,NN)
      DO 89 J=1,48
      NN=NN+1
89    CALL PULSE (N,N)
      GO TO 10
41    RO=0.
      IK=46
      RX=2.
      GO TO 69
46    RO=0.0
      RX=-4.
      IK=23
69    DO 67 I=1,31
      DO 67 J=1,6
67    PTS(J,I)=OBJ(J,I)
      DO 68 I=1,IK
      RO=RO+RX
      INIT=1
      CALL ROPIYA(RO,0.0,0.0,CEN(1),CEN(2),CEN(3))
      CALL ROTMAP(IDS,IDL,DIST)
68    NN=NN+1
      DO 70 J=1,48
      NN=NN+1
70    CALL PULSE (N,N)
        GO TO 10
416    DO 90 J=1,48
      NN=NN+1
90    CALL PULSE(N,N)
      GO TO 10
43    RO=0
      IK=46
      RX=2.
      GO TO 634
48    RO=0
      IK=23
      RX=-4.
634   DO 63 I=12,21
      DO 63 J=1,6
63    PTS(J,I)=OBJ(J,I)
      DO 64 I=1,IK
      RO=RO+RX
      INIT=1
      I3STRT=12
      I3END=21
      CALL ROPIYA(RO,0.0,0.0,CEN(1),CEN(2),CEN(3))
      I3STRT=1
      I3END=31
      CALL ROTMAP(IDS,IDL,DIST)
64    NN=NN+1
      DO 643 J=1,48
      NN=NN+1
643   CALL PULSE(N,N)
      GO TO 10
42    PI=0
      IK=46
      PX=-2.
      GO TO 212
47    PI=0
      IK=23
      PX=4.
212   DO 21 I=1,31
      DO 21 J=1,6
21    PTS(J,I)=OBJ(J,I)
      DO 22 I=1,IK
      PI=PI+PX
      INIT=1
      CALL ROPIYA(0.0,PI,0.0,CEN(1),CEN(2),CEN(3))
      CALL ROTMAP(IDS,IDL,DIST)
22    NN=NN+1
      DO 221 J=1,48
      NN=NN+1
221   CALL PULSE(N,N)
      GO TO 10
44    PI=0
      IK=46
      PX=-2.
      GO TO 312
49    PI=0
      PX=4.
      IK=23
312   DO 31 I=22,31
      DO 31 J=1,6
31    PTS(J,I)=OBJ(J,I)
      DO 32 I=1,IK
      PI=PI+PX
      INIT=1
      I3STRT=22
      CALL ROPIYA(0.0,PI,0.0,CEN(1),CEN(2),CEN(3))
      I3STRT=1
      CALL ROTMAP(IDS,IDL,DIST)
32    NN=NN+1
      DO 321 J=1,48
      NN=NN+1
321   CALL PULSE(N,N)
      GO TO 10
      STOP
      END
221   CALL PULSE(N,N)
      GO TO 10
44    PI=0
      IK=46
      PX=-2.
      GO TO 312
49    PI=0
      PX=4.
      IK=23
312   DO 31 I=22,31
      DO 31 J=1,6
31    PTS(J,I)=OBJ(J,I)
      DO 32 I=1,IK
      PI=PI+PX
      INIT=1
      I3STRT=22
      CALL ROPIYA(0.0,PI,0.0,CEN(1),CEN(2),CEN(3))
      I3STRT=1
      CALL ROTMAP(IDS,IDL,DIST)
32    NN=NN+1
      DO 321 J=1,48
      NN=NN+1
321   CALL PULSE(N,N)
      GO TO 10
      STOP
      END
