Mathc complexes/09d
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00d.c |
|---|
/* ------------------------------------ */
/* Save as : c00d.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
#define RCA RC2
/* ------------------------------------ */
/* ------------------------------------ */
int main(void)
{
double a[RCA*RCA] ={
+1.142857142857, +0.571428571428,
-0.285714285714, -0.142857142857
};
double P[RCA*C1] ={
+3,
+1
};
double **A = ca_A_mRZ(a, i_mZ(RCA,RCA));
double **p = ca_A_mRZ(P, i_mZ(RCA,C1));
double **Pp = i_mZ(RCA,C1);
clrscrn();
printf(" A :");
p_mRZ(A, S9,P12, C4);
printf(" p: A point of the plan");
p_mRZ(p, S9,P12, C4);
printf(" Pp: The projection of p on the line");
mul_mZ(A,p,Pp);
P_mRZ(Pp, S9,P12, C4);
stop();
f_mZ(A);
f_mZ(p);
f_mZ(Pp);
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Vous pouvez calculer la projection d'un point P sur la droite. Vous pouvez tracer un repère cartésien pour vérifier le résultat pour P(-5,3), P(3,1) et P(-1,2).
Exemple de sortie écran :
A :
+1.142857142857 +0.571428571428
-0.285714285714 -0.142857142857
p: A point of the plan
+3.000000000000
+1.000000000000
Pp: The projection of p on the line
+3.999999999999,
-0.999999999999
Press return to continue.