j3copl
C J3COPL SOURCE CHAT 05/01/13 00:46:07 5004 C---------------------------------------------------- C LES FACES WWORK1 ET WWORK2 SONT-ELLES COPLANAIRES? C SI OUI, ON EN MET UNE DANS LE REPERE DE L'AUTRE C C PP 9/97 C Pierre Pegon/JRC Ispra C---------------------------------------------------- IMPLICIT INTEGER(I-N) IMPLICIT REAL*8(A-H,O-Z) C -INC PPARAM -INC CCOPTIO C SEGMENT WWORK REAL*8 PORIG(3),VNORM(3),VI(3),VJ(3) INTEGER FWORK INTEGER TWORK(NTROU) ENDSEGMENT POINTEUR WWORK1.WWORK,WWORK2.WWORK C SEGMENT WORK REAL*8 XYC(2,NPTO) INTEGER IST(3,NPTO) REAL*8 DENS(NPTO) INTEGER JUN ENDSEGMENT LOGICAL LPLAN C C ON VERIFIE QUE LES NORMALES SONT COPLANAIRES C XPMIX=(WWORK1.VNORM(2)*WWORK2.VNORM(3) > -WWORK1.VNORM(3)*WWORK2.VNORM(2))**2 > +(WWORK1.VNORM(3)*WWORK2.VNORM(1) > -WWORK1.VNORM(1)*WWORK2.VNORM(3))**2 > +(WWORK1.VNORM(1)*WWORK2.VNORM(2) > -WWORK1.VNORM(2)*WWORK2.VNORM(1))**2 XPMIX=SQRT(XPMIX) LPLAN=XPMIX.LT.TOL IF(.NOT.LPLAN)RETURN C C ON VERIFIE QUE L'ORIGINE DU SECOND PLAN EST SUR LE PREMIER C XDIST=WWORK1.VNORM(1)*(WWORK2.PORIG(1)-WWORK1.PORIG(1)) > +WWORK1.VNORM(2)*(WWORK2.PORIG(2)-WWORK1.PORIG(2)) > +WWORK1.VNORM(3)*(WWORK2.PORIG(3)-WWORK1.PORIG(3)) LPLAN=ABS(XDIST).LT.TOL IF(.NOT.LPLAN)RETURN C C ON CHANGE LE HEADER DE WWORK2 AINSI QUE LE SYSTEME DE COORDONNEES C XSCAL=WWORK1.VNORM(1)*WWORK2.VNORM(1) > +WWORK1.VNORM(2)*WWORK2.VNORM(2) > +WWORK1.VNORM(3)*WWORK2.VNORM(3) ISI=INT(SIGN(1.D0,XSCAL)) C X12=(WWORK2.PORIG(1)-WWORK1.PORIG(1))*WWORK1.VI(1) > +(WWORK2.PORIG(2)-WWORK1.PORIG(2))*WWORK1.VI(2) > +(WWORK2.PORIG(3)-WWORK1.PORIG(3))*WWORK1.VI(3) Y12=(WWORK2.PORIG(1)-WWORK1.PORIG(1))*WWORK1.VJ(1) > +(WWORK2.PORIG(2)-WWORK1.PORIG(2))*WWORK1.VJ(2) > +(WWORK2.PORIG(3)-WWORK1.PORIG(3))*WWORK1.VJ(3) C A=WWORK2.VI(1)*WWORK1.VI(1)+WWORK2.VI(2)*WWORK1.VI(2) > +WWORK2.VI(3)*WWORK1.VI(3) B=WWORK2.VI(1)*WWORK1.VJ(1)+WWORK2.VI(2)*WWORK1.VJ(2) > +WWORK2.VI(3)*WWORK1.VJ(3) C DO IE1=1,3 WWORK2.PORIG(IE1)=WWORK1.PORIG(IE1) WWORK2.VNORM(IE1)=WWORK1.VNORM(IE1) WWORK2.VI(IE1)=WWORK1.VI(IE1) WWORK2.VJ(IE1)=WWORK1.VJ(IE1) ENDDO C WWORK=WWORK2 DO IE1=1,1+TWORK(/1) IF(IE1.EQ.1)THEN WORK=FWORK ELSE ENDIF NPTO=DENS(/1) DO IE2=1,NPTO X1=X12+XYC(1,IE2)*A-ISI*XYC(2,IE2)*B Y1=Y12+XYC(1,IE2)*B+ISI*XYC(2,IE2)*A XYC(1,IE2)=X1 XYC(2,IE2)=Y1 ENDDO ENDDO C RETURN END
© Cast3M 2003 - Tous droits réservés.
Mentions légales