C FLY PROGRAM			BY J.A.SMITH
C				   DEPT. OF SYSTEMS DESIGN
C THIS PROGRAM ALLOWS ONE TO MOVE (FLY) AROUND ANY DATA SET THAT IS 
C READ IN.
	DIMENSION LIST(10)
	COMMON/LIMITS/XMIN,XMAX,YMIN,YMAX
	COMMON/OUTPUT/I1STRT,I1END,LINE(4,600)
	COMMON/PAINT/I2STRT,I2END,PICT(4,300)
	COMMON/BULK/I3STRT,I3END,O(6,300)
	COMMON/EYCEP/EYE(3),CENTRE(3),UP(3)
C
	XMIN=(-80.0)
	XMAX=80.0
	YMIN=XMIN
	YMAX=XMAX
	CALL SETUP
	CALL WINDOW (.FALSE.)
C
	READ (5,10) N,ARRAY
	WRITE (4,10) N
	READ (5,11) ((O(I,J),I=1,6),J=1,N)
10	FORMAT (I4,A3)
11	FORMAT (6F10.2)
C
	RADIAN=3.14159/180.0
C
	I2STRT=1
	I3STRT=1
	I3END=N
C
	IDS=300
	IDL=1
C
	EYE(1)=0.0
	EYE(2)=20.0
	EYE(3)=200.0
C
C
100	CALL ADINP(.TRUE.,3,36,LIST,.TRUE.)
	XDEL=(LIST(1)-1040)/100
	ZDEL=(LIST(2)-1020)/100
	TURN=(LIST(3)-1020)/150
C
1	EYE(1)=EYE(1)+XDEL
	EYE(3)=EYE(3)+ZDEL
C
	XD=CENTRE(1)-EYE(1)
	ZD=CENTRE(3)-EYE(3)
	ANG=-TURN*RADIAN
	COSE=COS(ANG)
	SINE=SIN(ANG)
	CENTRE(1)=(XD*COSE+ZD*SINE)+EYE(1)
	CENTRE(2)=5.0
	CENTRE(3)=(ZD*COSE-XD*SINE)+EYE(3)
C
	UP(1)=CENTRE(1)
	UP(2)=CENTRE(2)+10.0
	UP(3)=CENTRE(3)
C
	CALL ROTER
	CALL MAPPER (250.0)
	I1STRT=IDS
	CALL FIT
	CALL DRAWS (LINE,I1STRT,I1END)
	ISAV=IDS
	IDS=IDL
	IDL=ISAV
C
	GO TO 100
2	CONTINUE
	STOP
	END
