C31938  MEMBER NAME  JEOSUM3  (GRAFIX.S)    SHELTRAN
Copyright Stanford  Mortran3.1   (FORTRAN 66 11JUN85)
      SUBROUTINE ELLIPS( MODE, INDEX, IDSHE, X, Y, DX, DY, PHIW )
      LOGICAL FLVCDO
      COMMON / CGVCDO / FLVCDO(20)
      IF  (MODE.NE.1) GO TO 20
      IF  (INDEX.NE.20) GO TO 40
      CALL DRAMOV( -X-8.0, Y , -X+8.0, Y , 0 )
      CALL DRAMOV( -X , Y-8.0, -X , Y+8.0, 0 )
      GO TO 30
40    IF(INDEX.NE.17)GO TO 50
      SNPHW = 0.0
      CSPHW = 1.0
      XDEV = DX
      YDEV = DY
      CALL DRAMOV( -X-XDEV, Y , -X+XDEV, Y , 0 )
      CALL DRAMOV( -X , Y-YDEV, -X , Y+YDEV, 0 )
30    CONTINUE
50    CONTINUE
      GO TO 10
20    CONTINUE
      XDEV = DX
      YDEV = DY
      IF  (PHIW.NE.0.0) GO TO 70
      SNPHW = 0.0
      CSPHW = 1.0
      CALL DRAMOV( -X-DX, Y , -X+DX, Y , 0 )
      CALL DRAMOV( -X , Y-YD, -X , Y+DY, 0 )
      GO TO 60
70    CONTINUE
      SNPHW = SIN(PHIW)
      CSPHW = COS(PHIW)
      XN1 = -DX*CSPHW + X
      XN2 = DX*CSPHW + X
      YN1 = DX*SNPHW + Y
      YN2 = -DX*SNPHW + Y
      XN3 = -DY*SNPHW + X
      XN4 = DY*SNPHW + X
      YN3 = -DY*CSPHW + Y
      YN4 = DY*CSPHW + Y
      CALL DRAMOV( -XN1, YN1, -XN2, YN2, 0 )
      CALL DRAMOV( -XN3, YN3, -XN4, YN4, 0 )
60    CONTINUE
10    CONTINUE
      IF  ((MODE.NE.1.OR.INDEX.NE.17).AND.(MODE.NE.0.OR..NOT.(FLVCDO(17)
     *))) GO TO 90
      NPRE = 25
      DTWI = 6.28318/FLOAT(NPRE)
      TWI = 0.0
      XNS = XDEV*CSPHW + X
      YNS = -XDEV*SNPHW + Y
      CALL MOVEA( -XNS, YNS )
      DO 101 I=1,NPRE
      TWI = TWI + DTWI
      XE = XDEV*COS(TWI)
      YE = YDEV*SIN(TWI)
C01 MAY 80)    ELLIPS    SYSTEM/370 FORTRAN H EXTENDED (ENHANCED)    DATE 97.082/19.36.47       PAGE   2
      XN = XE*CSPHW + YE*SNPHW + X
      YN = -XE*SNPHW + YE*CSPHW + Y
      IF  (IDSHE.NE.0) GO TO 120
      CALL DRAWA( -XN, YN )
      GO TO 110
120   CONTINUE
      CALL DASHA( -XN, YN, IDSHE )
110   CONTINUE
101   CONTINUE
102   CONTINUE
90    CONTINUE
      RETURN
      END
