proj
C PROJ SOURCE CHAT 05/01/13 02:32:14 5004 C SOURCE MARTINEZ C C Projection de M0 sur le plan M1,M2,M3 -> P0 C C IMPLICIT INTEGER(I-N) IMPLICIT REAL*8 (A-H,O-Z) REAL*8 P0(3),M0(3),M1(3),M2(3),M3(3) REAL*8 AP(3,3),YP(3),XP(3) LOGICAL DIM2,DETNUL C A1=M2(1)-M1(1) A2=M2(2)-M1(2) A3=M2(3)-M1(3) B1=M3(1)-M1(1) B2=M3(2)-M1(2) B3=M3(3)-M1(3) C3=A1*B2-A2*B1 C AP(1,1)=A1 AP(1,2)=A2 AP(1,3)=A3 AP(2,1)=B1 AP(2,2)=B2 AP(2,3)=B3 AP(3,3)=C3 C YP(1)=A1*M0(1)+A2*M0(2)+A3*M0(3) YP(2)=B1*M0(1)+B2*M0(2)+B3*M0(3) C C C > 1ERE EQUATION : M1M2.M0P0 = 0 C > 2EME EQUATION : M1M3.M0P0 = 0 C > 3EME EQUATION : DET(M1M2,M1M3,M1P0) = 0 C C C IF (DETNUL.EQV..FALSE.) THEN P0(1)=XP(1) P0(2)=XP(2) P0(3)=XP(3) DIM2=.TRUE. ELSE P0(1)=0.D0 P0(1)=0.D0 P0(1)=0.D0 DIM2=.FALSE. ENDIF C C P0(1)=M0(1) C P0(2)=M0(2) C P0(3)=M0(3) RETURN END
© Cast3M 2003 - Tous droits réservés.
Mentions légales