C THIS PROGRAM READS IN THE COORDINATES X,Y,Z OF ANY DATA SET
C  AND ROTATES IT ON THE OSCILLOSCOPE.
	DIMENSION SINE(360),COSE(360)
	COMMON/OUTPUT/LINE(4,300)
	COMMON/PAINT/I2STRT,I2END,PICT(4,300)
	COMMON/BULK/I3STRT,I3END,O(6,300)
	COMMON/LIMITS/XMIN,XMAX,YMIN,YMAX
100	FORMAT (I4)
101	FORMAT (6F10.2)
	XMIN=-100.0
	XMAX=100.0
	YMIN=XMIN
	YMAX=XMAX
	READ (5,100) N
	READ (5,101) ((O(I,J),I=1,6),J=1,N)
	PI=3.14159/180.0
C
	DO 1 I=1,360
	ANG=I
	ANG=ANG*PI
	SINE(I)=SIN(ANG)
	COSE(I)=COS(ANG)
1	CONTINUE
C
	IANG=0
	I2STRT=1
	I2END=N
	L=1
	M=2
	IDS=1
	IDL=150
5	DO 6 IANG=1,360,2
2	DO 3 I=1,I2END
	PICT(1,I)=O(L,I)*COSE(IANG)-O(M,I)*SINE(IANG)
	PICT(2,I)=O(L,I)*SINE(IANG)+O(M,I)*COSE(IANG)
	PICT(3,I)=O(L+3,I)*COSE(IANG)-O(M+3,I)*SINE(IANG)
	PICT(4,I)=O(L+3,I)*SINE(IANG)+O(M+3,I)*COSE(IANG)
3	CONTINUE
C
C SCALE VALUES FROM PICT STARTING AT I2STRT AND ENDING AT
C  I2END.  IT PLACES THEM IN THE LINE FILE STARTING AT
C  I1STRT AND RETURNS THE NUMBER WHERE THE DISPLAY ENDS
C  AS I1END.
	I1STRT=IDS
	CALL SCALE (I1STRT,I1END)
C
C DISPLAY THE LINES IN THE 'LINE' FILE STARTING
C  AT I1STRT AND ENDING AT I1END.
	CALL DRAW2 (LINE,I1STRT,I1END)
	ITEMP=IDS
	IDS=IDL
	IDL=ITEMP
6	CONTINUE
	GO TO 5
200	STOP
	END
