Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1454 → Rev 1455

/demos/trunk/orbit/orbit.c
18,11 → 18,11
 
/*
------------
CVS : $Id: orbit.c,v 1.6 2004-05-23 12:53:54 giacomo Exp $
CVS : $Id: orbit.c,v 1.7 2004-05-23 12:58:46 giacomo Exp $
 
File: $File$
Revision: $Revision: 1.6 $
Last update: $Date: 2004-05-23 12:53:54 $
Revision: $Revision: 1.7 $
Last update: $Date: 2004-05-23 12:58:46 $
------------
*/
 
92,17 → 92,17
X_centro: 320 Y_centro: 240\n\
------------------- pianeti ------------------------\n\
massa pos.x pos.y vel.x vel.y\n\
0: \t6.0e21 \t0. \t0. \t0. \t0.\n\
1: \t1.0e21 \t10000. \t8000. \t-60. \t0.\n\
2: \t1.0e8 \t5000. \t0. \t0. \t80.\n\
3: \t5.0e18 \t10000. \t8000. \t-50. \t0.\n\
4: \t1.0e9 \t10000. \t8000. \t-40. \t20.\n\
5: \t1.0e15 \t1000. \t5000. \t-80. \t0.\n\
6: \t1.0e5 \t1000. \t5000. \t-80. \t0.\n\
7: \t1.0e17 \t1000. \t5000. \t-80. \t0.\n\
8: \t1.0e5 \t1000. \t5000. \t-80. \t0.\n\
9: \t1.0e5 \t1000. \t5000. \t-80. \t0.\n\
10: \t1.0e5 \t1000. \t5000. \t-80. \t0.\n\
0: \t6.0e21 \t0. \t0. \t0. \t0. \n\
1: \t1.0e21 \t10000. \t8000. \t-60. \t0. \n\
2: \t1.0e8 \t5000. \t0. \t0. \t80. \n\
3: \t5.0e18 \t10000. \t8000. \t-50. \t0. \n\
4: \t1.0e9 \t10000. \t8000. \t-40. \t20. \n\
5: \t1.0e15 \t1000. \t5000. \t-80. \t0. \n\
6: \t1.0e5 \t1000. \t5000. \t-80. \t0. \n\
7: \t1.0e17 \t1000. \t5000. \t-80. \t0. \n\
8: \t1.0e5 \t1000. \t5000. \t-80. \t0. \n\
9: \t1.0e5 \t1000. \t5000. \t-80. \t0. \n\
10: \t1.0e5 \t1000. \t5000. \t-80. \t0. \n\
----------------------------------------------------\n";
 
// -------------------------------------------------------
314,6 → 314,13
sscanf(&fbuf[x], "%d", &YGS);
 
for (i=0; i<MAX; i++) {
 
mass[i] = 0.;
px = 0.;
py = 0.;
vx = 0.;
vy = 0.;
 
while ((fbuf[x] != '\t') && (x < flen)) x++;
x++;
sscanf(&fbuf[x], "%f", &mass[i]);