Aller au contenu

Mathc matrices/08y

Un livre de Wikilivres.


Application

Installer et compiler ces fichiers dans votre répertoire de travail.

c00d.c
/* ------------------------------------ */
/*  Save as :   c00d.c                  */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */     
#define RCA          RC3  
/* ------------------------------------ */       
/* ------------------------------------ */
int main(void)
{                          
double a[RCA*RCA] ={   
+2.363636363638, -1.909090909092, -0.272727272727, 
+1.818181818184, -1.545454545456, -0.363636363636, 
-0.909090909092, +1.272727272728, +1.181818181818         
};
/* You can choose the value of the point P */
double P[RCA*C1] ={   
+2,
+5,
+6,                                                                                                                            
};
                       
double **A  =  ca_A_mR(a,   i_mR(RCA,RCA));
double **p  =  ca_A_mR(P,   i_mR(RCA,C1));
double **Pp =   mul_mR(A,p, i_mR(RCA,C1));;

  clrscrn();
  printf(" A :");
  p_mR(A, S9,P12, C4); 
  
  printf(" You can choose the value of the point p\n\n"
         " p:");
  p_mR(p, S9,P1, C4); 
 
  printf(" The projection of p on the plan defined by v1 and v2.\n\n"
         " Pp:            Copy this matrix into c00e.c");
  P_mR(Pp, 18,P12, C4);      
  stop();
 
  f_mR(A);
  f_mR(p);
  f_mR(Pp);
  
  return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
 Vous pouvez calculer la projection d'un point P sur le plan. 

Exemple de sortie écran :

                                                       
 A :
+2.363636363638 -1.909090909092 -0.272727272727 
+1.818181818184 -1.545454545456 -0.363636363636 
-0.909090909092 +1.272727272728 +1.181818181818 

 You can choose the value of the point p

 p:
     +2.0 
     +5.0 
     +6.0 

 The projection of p on the plan defined by v1 and v2.

 Pp:            Copy this matrix into c00e.c
   -6.454545454546, 
   -6.272727272728, 
  +11.636363636364 

 Press return to continue.