     	SUBROUTINE IFMARK( ICODE, IR, ARRAY )
C
C   PROGRAMMER: R.S. ZHOU,		ALFRED UNIVERSITY
C
C	THIS ROUTINE DRAWS THE MARKER SYMBOLS USING "IFDRAW" SUBROUTINE.
C
C	ICODE --- POINTER TO THE FOLLOWING SYMBOL TABLE:
C
C		ICODE = 1 : SQUARE
C		ICODE = 2 : SOLID SQUARE
C		ICODE = 3 : HEXAGON
C		ICODE = 4 : SOLID HEXAGON
C		ICODE = 5 : TRIANGLE
C		ICODE = 6 : SOLID TRIANGLE
C		ICODE = 7 : DIAMOND
C		ICODE = 8 : SOLID DIAMOND
C		ICODE = 9 : PLUS
C		ICODE =10 : CROSS
C		ICODE =11 : STAR
C		ICODE =12 : DOUBLE TRIANGLES
C		ICODE =13 : CIRCLE
C		ICODE =14 : CIRCLE + CROSS
C		ICODE =15 : FULL MOON
C		ICODE =16 : RIGHT HALF MOON
C		ICODE =17 : LEFT HALF MOON
C		ICODE =18 : TOP HALF MOON
C		ICODE =19 : BOTTOM HALF MOON
C
C	IR --------- NUMBER OF ELEMENTS IN "ARRAY".
C	ARRAY(1) --- DIAMETER OF SYMBOL IN INCHES.
C	ARRAY(2) --- X-COORDINATE OF SYMBOL CENTER.
C	ARRAY(3) --- X-COORDINATE OF SYMBOL CENTER.
C	ARRAY(4) --- ROTATION ANGLE IN DEGREES.
C
     	INCLUDE 'IMAGEM.CBS'
     	DIMENSION	ARRAY(1)

     	IRR = IABS(IR)
     	RAD = 0.5*ARRAY(1)
    	IF( RAD.LT.0.005 ) RAD = 0.005
C
C  REORIGIN TO (ARRAY(2),ARRAY(3))...
C
     	CALL IFDRAW( ARRAY(2), ARRAY(3), -3 )
C
C  SET THE SYMBOL ROTATION IF AT ALL...
C
    	IF( IRR.GT.3 .AND. ARRAY(4).NE.0.0 ) THEN
     	    ANGX = XANG
     	    ANGY = YANG
     	    CALL IFROTA( ARRAY(4)+XANG, ARRAY(4)+YANG )
     	ENDIF
C
C  RESET THE SCALE FACTORS...
C
     	IF( XSCL.NE.YSCL ) THEN
     	    XSCF = XSCL
     	    YSCF = YSCL
     	    CALL IFSCAL( XSCF, XSCF )
     	ENDIF
     	LTYOLD = LTY
     	IF( LTY.GT.1 ) CALL IFSTYL(LTY,0)

    	ICD = IABS(ICODE)
     	IF( ICD.EQ.1 ) THEN			!SQUARE
     	    CALL IFMARK_SQUARE( 0.9*RAD )
     	ELSE IF( ICD.EQ.2 ) THEN		!SOLID SQUARE
     	    CALL IFMARK_SSQUARE( 0.9*RAD )
     	ELSE IF( ICD.EQ.3 ) THEN		!HEXAGON
     	    CALL IFMARK_HEXAGON( RAD )
     	ELSE IF( ICD.EQ.4 ) THEN
     	    CALL IFMARK_SHEXAGON( RAD )		!SOLID HEXAGON
     	ELSE IF( ICD.EQ.5 ) THEN
     	    CALL IFMARK_TRIANGLE( 1.2*RAD )	!TRIANGLE
     	ELSE IF( ICD.EQ.6 ) THEN
     	    CALL IFMARK_STRIANGLE( 1.2*RAD )	!SOLID TRIANGLE
     	ELSE IF( ICD.EQ.7 ) THEN
     	    CALL IFMARK_DIAMOND( 1.2*RAD )	!DIAMOND
     	ELSE IF( ICD.EQ.8 ) THEN
     	    CALL IFMARK_SDIAMOND( 1.2*RAD )	!SOLID DIAMOND
     	ELSE IF( ICD.EQ.9 ) THEN
     	    CALL IFMARK_PLUS( RAD )		!PLUS SIGN
     	ELSE IF( ICD.EQ.10 ) THEN
     	    CALL IFMARK_CROSS( 0.85*RAD )	!CROSS
     	ELSE IF( ICD.EQ.11 ) THEN
     	    CALL IFMARK_PLUS( RAD )		!PLUS SIGN
     	    CALL IFMARK_CROSS( 0.85*RAD )	!CROSS
     	ELSE IF( ICD.EQ.12 ) THEN
     	    CALL IFMARK_DTRIANGLE( RAD )	!DOUBLE TRIANGLE
     	ELSE IF( ICD.EQ.13 .OR. ICD.EQ.14 .OR. ICD.EQ.15 ) THEN
     	    IF( ICD.EQ.15 ) CALL IFFILL(1)
     	    CALL IFMARK_CIRCLE( RAD )		!CIRCLE
     	    IF( ICD.EQ.14 ) CALL IFMARK_PLUS(RAD)
     	    IF( ICD.EQ.15 ) CALL IFFILL(0)
     	ELSE IF( ICD.EQ.16 ) THEN
     	    CALL IFMARK_RMOON( RAD )		!RIGHT HALF MOON
     	ELSE IF( ICD.EQ.17 ) THEN
     	    CALL IFMARK_LMOON( RAD )		!LEFT HALF MOON
     	ELSE IF( ICD.EQ.18 ) THEN
     	    CALL IFMARK_TMOON( RAD )		!TOP HALF MOON
     	ELSE IF( ICD.EQ.19 ) THEN
     	    CALL IFMARK_BMOON( RAD )		!BOTTOM HALF MOON
     	ENDIF
C
C  RESTORE ...
C
     	IF( LTYOLD.GT.1 ) CALL IFSTYL(LTYOLD,0)
     	CALL IFDRAW( -ARRAY(2), -ARRAY(3), -3 )
     	IF( XSCF.NE.YSCF ) CALL IFSCAL( XSCF, YSCF )
    	IF( IRR.GT.3.AND.ARRAY(4).NE.0.0 ) CALL IFROTA( ANGX,ANGY )
     	RETURN
     	END

     	SUBROUTINE IFMARK_SQUARE( SIZE )
     	RAD = SIZE
     	CALL IFDRAW(  0.0,  RAD, 2 )
    	CALL IFDRAW( -RAD,  RAD, 2 )
    	CALL IFDRAW( -RAD, -RAD, 2 )
    	CALL IFDRAW(  RAD, -RAD, 2 )
    	CALL IFDRAW(  RAD,  RAD, 2 )
     	CALL IFDRAW(  0.0,  RAD, 2 )
     	RETURN
     	END

     	SUBROUTINE IFMARK_SSQUARE( SIZE )
     	RAD = SIZE
     	CALL IFFILL(1)
    	CALL IFDRAW( -RAD,  RAD, 3 )
    	CALL IFDRAW( -RAD, -RAD, 2 )
    	CALL IFDRAW(  RAD, -RAD, 2 )
    	CALL IFDRAW(  RAD,  RAD, 2 )
     	CALL IFDRAW( -RAD,  RAD, 2 )
     	CALL IFFILL(0)
     	RETURN
     	END

     	SUBROUTINE IFMARK_HEXAGON( SIZE )
     	RAD = SIZE
     	ADD = 0.866*RAD
     	DDA = 0.500*RAD
    	CALL IFDRAW(  0.0,  RAD, 2 )
    	CALL IFDRAW( -ADD,  DDA, 2 )
    	CALL IFDRAW( -ADD, -DDA, 2 )
    	CALL IFDRAW(  0.0, -RAD, 2 )
    	CALL IFDRAW(  ADD, -DDA, 2 )
    	CALL IFDRAW(  ADD,  DDA, 2 )
     	CALL IFDRAW(  0.0,  RAD, 2 )
     	RETURN
     	END

     	SUBROUTINE IFMARK_SHEXAGON( SIZE )
     	RAD = SIZE
     	ADD = 0.866*RAD
     	DDA = 0.500*RAD
     	CALL IFFILL(1)
    	CALL IFDRAW(  0.0,  RAD, 3 )
    	CALL IFDRAW( -ADD,  DDA, 2 )
    	CALL IFDRAW( -ADD, -DDA, 2 )
    	CALL IFDRAW(  0.0, -RAD, 2 )
    	CALL IFDRAW(  ADD, -DDA, 2 )
    	CALL IFDRAW(  ADD,  DDA, 2 )
     	CALL IFDRAW(  0.0,  RAD, 2 )
     	CALL IFFILL(0)
     	RETURN
     	END

     	SUBROUTINE IFMARK_TRIANGLE( SIZE )
     	RAD = SIZE
     	ADD = 0.500*RAD
     	DDA = 0.866*RAD
     	CALL IFDRAW(  0.0,  RAD, 2 )
    	CALL IFDRAW( -DDA, -ADD, 2 )
    	CALL IFDRAW(  DDA, -ADD, 2 )
    	CALL IFDRAW(  0.0,  RAD, 2 )
     	RETURN
     	END

     	SUBROUTINE IFMARK_STRIANGLE( SIZE )
     	RAD = SIZE
     	ADD = 0.500*RAD
     	DDA = 0.866*RAD
     	CALL IFFILL(1)
     	CALL IFDRAW(  0.0,  RAD, 3 )
    	CALL IFDRAW( -DDA, -ADD, 2 )
    	CALL IFDRAW(  DDA, -ADD, 2 )
    	CALL IFDRAW(  0.0,  RAD, 2 )
     	CALL IFFILL(0)
     	RETURN
     	END

     	SUBROUTINE IFMARK_DIAMOND( SIZE )
     	RAD = SIZE
     	CALL IFDRAW(  0.0,  RAD, 2 )
    	CALL IFDRAW( -RAD,  0.0, 2 )
    	CALL IFDRAW(  0.0, -RAD, 2 )
    	CALL IFDRAW(  RAD,  0.0, 2 )
    	CALL IFDRAW( 0.0, RAD, 2 )
     	RETURN
     	END

     	SUBROUTINE IFMARK_SDIAMOND( SIZE )
     	RAD = SIZE
     	CALL IFFILL(1)
     	CALL IFDRAW(  0.0,  RAD, 3 )
    	CALL IFDRAW( -RAD,  0.0, 2 )
    	CALL IFDRAW(  0.0, -RAD, 2 )
    	CALL IFDRAW(  RAD,  0.0, 2 )
    	CALL IFDRAW(  0.0,  RAD, 2 )
     	CALL IFFILL(0)
     	RETURN
     	END

     	SUBROUTINE IFMARK_PLUS( SIZE )
     	RAD = SIZE
     	CALL IFDRAW(  0.0,  RAD, 3 )
    	CALL IFDRAW(  0.0, -RAD, 2 )
    	CALL IFDRAW( -RAD,  0.0, 3 )
    	CALL IFDRAW(  RAD,  0.0, 2 )
     	RETURN
     	END

     	SUBROUTINE IFMARK_CROSS( SIZE )
     	RAD = SIZE
     	CALL IFDRAW( -RAD, -RAD, 3 )
    	CALL IFDRAW(  RAD,  RAD, 2 )
    	CALL IFDRAW( -RAD,  RAD, 3 )
    	CALL IFDRAW(  RAD, -RAD, 2 )
     	RETURN
     	END

     	SUBROUTINE IFMARK_DTRIANGLE( SIZE )
     	RAD = SIZE
     	ADD = 0.25*RAD
    	DDA = -RAD + ADD
    	DDD =  RAD + ADD
    	CALL IFDRAW(  0.0, DDD, 3 )
    	CALL IFDRAW( -RAD, DDA, 2 )
    	CALL IFDRAW(  RAD, DDA, 2 )
    	CALL IFDRAW(  0.0, DDD, 2 )
    	DDA = DDA - ADD - ADD
    	DDD = DDD - ADD - ADD
    	CALL IFDRAW(  0.0, DDA, 3 )
    	CALL IFDRAW( -RAD, DDD, 2 )
    	CALL IFDRAW(  RAD, DDD, 2 )
    	CALL IFDRAW(  0.0, DDA, 2 )
     	RETURN
     	END

     	SUBROUTINE IFMARK_CIRCLE( SIZE )
     	RAD = SIZE
     	CALL IFDRAW( 0.0, -RAD, 3 )
     	DO I=-80,270,10
     	   CALL IFDRAW( RAD*COSD(FLOAT(I)), RAD*SIND(FLOAT(I)), 2 )
    	ENDDO
     	RETURN
     	END

     	SUBROUTINE IFMARK_RMOON( SIZE )
     	RAD = SIZE
     	CALL IFFILL(1)
     	CALL IFDRAW( 0.0, -RAD, 3 )
     	DO I=-80,90,10
     	   CALL IFDRAW( RAD*COSD(FLOAT(I)), RAD*SIND(FLOAT(I)), 2 )
    	ENDDO
     	CALL IFFILL(0)
     	CALL IFDRAW( 0.0, RAD, 3 )
     	DO I=100,270,10
     	   CALL IFDRAW( RAD*COSD(FLOAT(I)), RAD*SIND(FLOAT(I)), 2 )
    	ENDDO
     	RETURN
     	END

     	SUBROUTINE IFMARK_LMOON( SIZE )
     	RAD = SIZE
     	CALL IFFILL(1)
     	CALL IFDRAW( 0.0, RAD, 3 )
     	DO I=100,270,10
     	   CALL IFDRAW( RAD*COSD(FLOAT(I)), RAD*SIND(FLOAT(I)), 2 )
    	ENDDO
     	CALL IFFILL(0)
     	CALL IFDRAW( 0.0, -RAD, 3 )
     	DO I=-80,90,10
     	   CALL IFDRAW( RAD*COSD(FLOAT(I)), RAD*SIND(FLOAT(I)), 2 )
    	ENDDO
     	RETURN
     	END

     	SUBROUTINE IFMARK_TMOON( SIZE )
     	RAD = SIZE
     	CALL IFFILL(1)
     	CALL IFDRAW( RAD, 0.0, 3 )
     	DO I=10,180,10
     	   CALL IFDRAW( RAD*COSD(FLOAT(I)), RAD*SIND(FLOAT(I)), 2 )
    	ENDDO
     	CALL IFFILL(0)
     	CALL IFDRAW( -RAD, 0.0, 3 )
     	DO I=-170,0,10
     	   CALL IFDRAW( RAD*COSD(FLOAT(I)), RAD*SIND(FLOAT(I)), 2 )
    	ENDDO
     	RETURN
     	END

     	SUBROUTINE IFMARK_BMOON( SIZE )
     	RAD = SIZE
     	CALL IFFILL(1)
     	CALL IFDRAW( RAD, 0.0, 3 )
     	DO I=-10,-180,-10
     	   CALL IFDRAW( RAD*COSD(FLOAT(I)), RAD*SIND(FLOAT(I)), 2 )
    	ENDDO
     	CALL IFFILL(0)
     	CALL IFDRAW( -RAD, 0.0, 3 )
     	DO I=170,0,-10
     	   CALL IFDRAW( RAD*COSD(FLOAT(I)), RAD*SIND(FLOAT(I)), 2 )
    	ENDDO
     	RETURN
     	END

