C  THE THIRD PART OF THE PROGRAM   J.K.COOK
C
C   	.TITLE THRED3
C
	COMMON/POINTS/INIT,PT(6,50)
	COMMON/OIL/IVECT(200)
	COMMON/BULK/I3STRT,I3END,OBJ(6,50)
	COMMON/PAINT/I2STRT,I2END,PIC(4,50)
	COMMON/EYCEP/E(3),C(3),U(3)
	COMMON/LIMITS/XMIN,XMAX,YMIN,YMAX
	CALL CLEAR(.TRUE.)
	READ(5,500)((OBJ(I,J),I=1,6),J=1,49)
500	FORMAT(6F5.1)
C
C
	DO 1 J=1,49
	DO 1 I=1,6
1	PT(I,J)=OBJ(I,J)
	RD=3.14159/180.
	XMIN=-12.
	XMAX=12.
	YMIN=-12.
	YMAX=12.
	E(1)=9999.*(72.*RD)
	E(2)=2501.
	E(3)=9999.*COS(72.*RD)
	C(1)=0.
	C(2)=0.
	C(3)=0.
	U(1)=0.
	U(2)=10.
	U(3)=0.
	DIST=9999.
	I3STRT=1
	I3END=41
	I2STRT=1
	I2END=41
	CALL ROTER
	CALL MAPPER(DIST)
	CALL VECTOR(1,PIC,I2STRT,I2END,IVECT,1,LAST,6,0,-1)
	CALL DISPLY(6,1,IVECT,1,LAST)
	PAUSE
C
C  MOVE TO FRONT VIEW IN 3 SEC.
C
	DX=(5.-E(1)/72.)
	DY=(5.-E(2)/72.)
	DZ=(9999.-E(3))/72.
	DO 2 I=1,72
	E(1)=E(1)+DX
	E(2)=E(2)+DY
	E(3)=E(3)+DZ
	IF(I.NE.72)GO TO 3
	E(1)=5.
	E(2)=5.
	E(3)=9999.
3	CALL ROTER
	CALL MAPPER(DIST)
	CALL VECTOR(1,PIC,I2STRT,I2END,IVECT,1,LAST,6,0,-1)
	CALL DISPLY(3,1)
	CALL DISPLY(6,1,IVECT,1,LAST)
2	CALL PULSE(IDO,IF)
C
C  PAUSE 3 SEC
C
	DO 4 I=1,72
4	CALL PULSE(IDO,IF)
C
C  ROTATE TO SEE TOP VIEW
C
	CX=0.
	CY=0.
	CZ=0.
	RO=0.
	PI=0.
	YA=0.
	DO 5 I=1,46
	RO=RO+2.
	INIT=1
	CALL ROPIYA(RO,PI,YA,CX,CY,CZ)
	CALL MAPPER(DIST)
	CALL VECTOR(1,PIC,I2STRT,I2END,IVECT,1,LAST,6,0,-1)
	CALL DISPLY(3,1)
	CALL DISPLY(6,1,IVECT,1,LAST)
5	CALL PULSE(IDO,IF)
C
C  PAUSE 5 SEC
C
	DO 6 I=1,120
6	CALL PULSE(IDO,IF)
C
C  ROTATE BACK TO FRONT
C
	RO=90.
	DO 7 I=1,45
	RO=RO-2.
	INIT=1
	CALL ROPIYA(RO,PI,YA,CX,CY,CZ)
	CALL MAPPER(DIST)
	CALL VECTOR(1,PIC,I2STRT,I2END,IVECT,1,LAST,6,0,-1)
	CALL DISPLY(3,1)
	CALL DISPLY(6,1,IVECT,1,LAST)
7	CALL PULSE(IDO,IF)
	DO 77 J=1,49
	DO 77 I=1,6
77	OBJ(I,J)=PT(I,J)
	CALL MAPPER(DIST)
	CALL VECTOR(1,PIC,I2STRT,I2END,IVECT,1,LAST,6,0,-1)
	CALL DISPLY(3,1)
	CALL DISPLY(6,1,IVECT,1,LAST)
	CALL PULSE(IDO,IF)
C
C  PAUSE 5 SEC
C
	DO 8 I=1,120
8	CALL PULSE(IDO,IF)
C
C  ROTATE TO RIGHT SIDE
C
	RO=0.
	PI=0.
	DO 9 I=1,46
	PI=PI-2.
	INIT=1
	CALL ROPIYA(RO,PI,YA,CX,CY,CZ)
	CALL MAPPER(DIST)
	CALL VECTOR(1,PIC,I2STRT,I2END,IVECT,1,LAST,6,0,-1)
	CALL DISPLY(3,1)
	CALL DISPLY(6,1,IVECT,1,LAST)
9	CALL PULSE(IDO,IF)
C
C  PAUSE 5 SEC
C
	DO 10 I=1,120
10	CALL PULSE(IDO,IF)
C
C  ROTATE BACK
C
	PI=-90.
	DO 11 I=1,45
	PI=PI+2.
	INIT=1
	CALL ROPIYA(RO,PI,YA,CX,CY,CZ)
	CALL MAPPER(DIST)
	CALL VECTOR(1,PIC,I2STRT,I2END,IVECT,1,LAST,6,0,-1)
	CALL DISPLY(3,1)
	CALL DISPLY(6,1,IVECT,1,LAST)
11	CALL PULSE(IDO,IF)
	DO 111 J=1,49
	DO 111 I=1,6
111	OBJ(I,J)=PT(I,J)
	CALL MAPPER(DIST)
	CALL VECTOR(1,PIC,I2STRT,I2END,IVECT,1,LAST,6,0,-1)
	CALL DISPLY(3,1)
	CALL DISPLY(6,1,IVECT,1,LAST)
	CALL PULSE(IDO,IF)
C
C  PAUSE 5 SEC
C
	DO 12 I=1,120
12	CALL PULSE(IDO,IF)
	PAUSE
C
C  FLY OFF
C
	DA=2.
	CZ=-10.
	PI=0.
14	DO 13 I=1,90
	PI=PI+DA
	INIT=1
	CALL ROPIYA(RO,PI,YA,CX,CY,CZ)
	CALL MAPPER(DIST)
	CALL VECTOR(1,PIC,I2STRT,I2END,IVECT,1,LAST,6,0,-1)
	CALL DISPLY(3,1)
	CALL DISPLY(6,1,IVECT,1,LAST)
13	CALL PULSE(IDO,IF)
	DA=-DA
	CZ=-CZ
	GO TO 14
	STOP
	END
