C	STAR PROGRAM
	INTEGER S(5),Q
	COMMON/DFILE/IBUF(4000)
	COMMON/RAND/IA,IB,IC
	DIMENSION X(69),Y(69),D(60)
	IA=0
	IB=0
	IC=0
	A1=383.
	IT=180	!3 OF TICKS BETWEEN PICTURES
	S(1)=1
	S(2)=1
	S(4)=1
	S(5)=-1
50	N=RAN(IA,IB)*2.0-3
C	NEXT LINE SETS # OF POINTS IN STAR
100	NPOINTS=RAN(IA,IB)*35.+10
	Q=N+4
	D1=6.28318/NPOINTS
	S(3)=NPOINTS/2
	A=0.
	DO 300 I=1,NPOINTS
	X(I)=INT(A1*SIN(A)+511.5)
	Y(I)=INT(A1*COS(A)+A1+.5)
300	A=A+D1
	CALL INIT(4000)
	I=1
	X1=X(1)
	Y1=Y(1)
	CALL APNT(X1,Y1,0,-5)
	DO 400 J1=S(Q),S(Q+1),S(Q+2)
	DO 500 K=1,NPOINTS
500	D(K)=0.
501	D(I)=1.
	DO 600 J2=1,S(4-Q)
	I=I+J1+J2-1
	IF(I.LE.NPOINTS)GOTO 440
	I=I-NPOINTS
440	CALL VECT(X(I)-X1,Y(I)-Y1,0,5)
	X1=X(I)
600	Y1=Y(I)
	IF(D(I))700,501,700
	DO 700 K=1,NPOINTS
	I=I+1
	IF (I-NPOINTS) 610,610,620
610	I=1
620	IF(D(I)) 700,625,700
625	CALL VECT (X(I)-X1,Y(I)-Y1,0,5)
	X1=X(I)
	Y1=Y(I)
C	CALL SLEEP (0,0,0,IPOT0())
	GOTO 501
700	CONTINUE
400	CONTINUE
C	CALL SLEEP (5)
C	CALL TIME(IT)
C900	CALL TIMR(IE)
900	CALL WAIT(300.,0.)
C	IF (IE.NE.0)GOTO 900
C	RETURN
	GOTO 50
	END
