Mathc initiation/006a
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00b.c |
|---|
/* ---------------------------------- */
/* save as c00b.c */
/* ---------------------------------- */
#include "x_afile.h"
#include "fb.h"
/* ---------------------------------- */
int main(void)
{
pt2d p = {1, 2};
v3d V = R_s_x_R_t(Rx,Ry,Rz, p);
clrscrn();
printf(" R : (s,t)-> %si %sj %sk\n\n", Rxeq,Ryeq,Rzeq);
printf(" with R = Rx i + Ry j + Rz k \n\n"
" | i j k | \n"
" | Rx_s Ry_s Rz_s | \n"
" | Rx_t Ry_t Rz_t |\n\n"
" R_s x R_t = (Ry_s * Rz_t - Ry_t * Rz_s) i \n"
" - (Rx_s * Rz_t - Rx_t * Rz_s) j \n"
" + (Rx_s * Ry_t - Rx_t * Ry_s) k \n\n"
" R_s x R_t = (%.3f,%.3f,%.3f)\n\n"
" Compute the Norm of R_s x R_t:\n\n"
" ||R_s x R_t|| = %.3f \n\n"
, V.i,V.j,V.k,
NR_s_x_R_t(Rx,Ry,Rz, p));
stop();
return 0;
}
/* ---------------------------------- */
/* ---------------------------------- */
Exemple de sortie écran :
R : (s,t)-> +(sin(s)*cos(t))i +(sin(s)*sin(t))j +(cos(s))k
with R = Rx i + Ry j + Rz k
| i j k |
| Rx_s Ry_s Rz_s |
| Rx_t Ry_t Rz_t |
R_s x R_t = (Ry_s * Rz_t - Ry_t * Rz_s) i
- (Rx_s * Rz_t - Rx_t * Rz_s) j
+ (Rx_s * Ry_t - Rx_t * Ry_s) k
R_s x R_t = (-0.295,0.644,0.455)
Compute the Norm of R_s x R_t:
||R_s x R_t|| = 0.841
Press return to continue.