Mathc initiation/a440
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c0a6.c |
---|
/* --------------------------------- */
/* save as c0a6.c */
/* --------------------------------- */
#include "x_afile.h"
#include "fa.h"
/* --------------------------------- */
int main(void)
{
CTRL_splot w;
w.xmin = -0., w.xmax = 3.;
w.ymin = -0., w.ymax = 3.;
w.zmin = -0., w.zmax = 5.;
w.rot_x = 55., w.rot_z = 57.;
w.scale = 1., w.scale_z = 1.;
double Mass = simpson_dzdydx(R, uz,vz,LOOP, sy,ty,LOOP, ax,bx,LOOP);
double Mxy = simpson_dzdydx( zR, uz,vz,LOOP, sy,ty,LOOP, ax,bx,LOOP);
double Mzx = simpson_dzdydx( yR, uz,vz,LOOP, sy,ty,LOOP, ax,bx,LOOP);
double Mzy = simpson_dzdydx( xR, uz,vz,LOOP, sy,ty,LOOP, ax,bx,LOOP);
pt3d XYZ = i_pt3d(Mzy/Mass, Mzx/Mass, Mxy/Mass);
clrscrn();
printf(" The function of density is :\n\n"
" R : x,y,z -> %s\n\n", Req);
printf(" The volume is :\n\n");
printf(" v : x,y -> %s \n", veq);
printf(" u : x,y -> %s\n\n", ueq);
printf(" t : x -> %s \n", teq);
printf(" s : x -> %s\n\n", seq);
printf(" b : -> %s \n", bxeq);
printf(" a : -> %s\n\n", axeq);
stop();
clrscrn();
printf(" Draw the center of mass :\n\n");
printf(" X = Mzy/Mass = %.2f\n"
" Y = Mzx/Mass = %.2f\n"
" Z = Mxy/Mass = %.2f\n\n\n",
Mzy/Mass, Mzx/Mass, Mxy/Mass);
G_cmass( w,
veq,
XYZ);
stop();
return 0;
}
/* --------------------------------- */
/* --------------------------------- */
Exemple de sortie écran :
Draw the center of mass :
X = Mzy/Mass = 1.86
Y = Mzx/Mass = 2.27
Z = Mxy/Mass = 2.58
... load "a_main.plt" ... with gnuplot.
Press return to continue.