SUBROUTINE RSURFU(H,P,TGT,DNDS,X,TIME,U,CINAME,SECNAME, 1 MAINNAME,NOEL,NODE,LCLOSE) C INCLUDE 'ABA_PARAM.INC' C CHARACTER*80 CINAME,SECNAME,MAINNAME DIMENSION P(3),TGT(3,2),DNDS(3,2),X(3,2),TIME(2),U(6,2) C C DEFINE THE FOLLOWING QUANTITIES: C A = RADIUS 'A' OF THE SPHERICAL HEAD C SINA = SINE (CONE ANGLE ALPHA) C COSA = COSINE (CONE ANGLE ALPHA) C Z0 = ORIGINAL 'Z' COORDINATE OF POINT 'Q' C A=5.0 SINA=0.5 COSA=0.86602 Z0=6.0 ZQ=Z0 + U(2,2) C C TEST FOR SEGMENT C IF(X(1,1)*SINA/COSA.LT.ZQ-X(2,1))THEN C C SPHERE C B=SQRT(X(1,1)**2 + (X(2,1)-ZQ)**2) H=A-B COSB=X(1,1)/B SINB=(ZQ-X(2,1))/B P(1)=A*COSB P(2)=ZQ-A*SINB TGT(1,1)=-SINB TGT(2,1)=-COSB DNDS(1,1)=-SINB/A DNDS(2,1)=-COSB/A ELSE C CONE H=-X(1,1)*COSA+(X(2,1)-ZQ)*SINA+A P(1)=X(1,1) + H*COSA P(2)=X(2,1)- H*SINA TGT(1,1)=-SINA TGT(2,1)=-COSA DNDS(1,1)=0. DNDS(2,1)=0. END IF RETURN END