C  A SEQUENCE TO DEFINE PROJECTION J.K.COOK
C
C	.TITLE DEFINE
C
	COMMON/SYSTEM/ES(3),CS(3),US(3)
	COMMON/VIEWER/EV(3),CV(3),UV(3)
	COMMON/SLIMS/XSMIN,XSMAX,YSMIN,YSMAX
	COMMON/VLIMS/XVMIN,XVMAX,YVMIN,YVMAX
	COMMON/DISTS/SDIST,VDIST
C
	CALL CLEAR(.TRUE.)
	CALL SYSM(0)
	EV(1)=55.
	EV(2)=22.
	EV(3)=55.
	CV(1)=0.
	CV(2)=0.
	CV(3)=0.
	UV(1)=0.
	UV(2)=10.
	UV(3)=0.
	VDIST=24.
	XVMIN=-10.
	XVMAX=10.
	YVMIN=-10.
	YVMAX=10.
C
	ES(1)=0.
	ES(2)=30.
	ES(3)=30.
	CS(1)=0.
	CS(2)=0.
	CS(3)=0.
	US(1)=0.
	US(2)=10.
	US(3)=0.
	SDIST=24.
	XSMIN=-10.
	XSMAX=10.
	YSMIN=-10.
	YSMAX=10.
	CALL SYSM(1)
	CALL SHOW(5,4,5,4,5)
C
C  MOVE SYSTEM EYE TOWARD OBJECT
C
	DY=(ES(2)-10.)/(96.)
	DO 1 I=1,96
	ES(2)=ES(2)-DY
	ES(3)=ES(3)-DY
	SDIST=SDIST-DY*SQRT(2.)
	CALL SHOW(3,3,3,3,3)
	CALL SYSM(1)
	CALL SHOW(5,4,5,4,5)
	CALL PULSE(IDO,IF)
1	CONTINUE
C
C  ROTATE EYE AROUND
C
	RD=3.14159/180.
	RAD=10.*SQRT(2.)
	TH=45.
	DO 2 I=1,45
	TH=TH+1.
	ES(2)=RAD*SIN(TH*RD)
	ES(3)=RAD*COS(TH*RD)
	US(2)=RAD*COS(TH*RD)
	US(3)=RAD*SIN(TH*RD)
	CALL SHOW(3,3,3,3,3)
	CALL SYSM(1)
	CALL SHOW(5,4,5,4,5)
	CALL PULSE(IDO,IF)
2	CONTINUE
C
C PAUSE
C
	DO 200 I=1,24
200	CALL PULSE(IDO,IF)
C
C  MORE ROTATION
C
	TH=90.
	DO 3 I=1,45
	TH=TH+2.
	ES(1)=RAD*COS(TH*RD)
	ES(2)=RAD*SIN(TH*RD)
	CALL SHOW(3,3,3,3,3)
	CALL SYSM(1)
	CALL SHOW(5,4,5,4,5)
	CALL PULSE(IDO,IF)
3	CONTINUE
	US(2)=10.
	US(3)=0.
C
C  FRAME ON
C
	CALL SHOW(4,4,5,4,5)
C
	DX=-ES(1)/72.
	DY=(10.-ES(2))/72.
	DZ=(10.-ES(3))/72.
	DO 4 I=1,72
	ES(1)=ES(1)+DX
	ES(2)=ES(2)+DY
	ES(3)=ES(3)+DZ
	CALL SHOW(3,3,3,3,3)
	CALL SYSM(1)
	CALL SHOW(4,4,5,4,5)
	CALL PULSE(IDO,IF)
4	CONTINUE
C
C  RAYS ON
C
	CALL SHOW(4,4,5,4,4)
	DO 5 I=1,36
5	CALL PULSE(IDO,IF)
C
C  IMAGE ON
C
	CALL SHOW(4,4,4,4,4)
	DO 6 I=1,36
6	CALL PULSE(IDO,IF)
C
C
	PAUSE
	STOP
	END
