Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Programming challenge, gravity
Message
De
24/06/2004 11:56:09
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
24/06/2004 11:43:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00916106
Message ID:
00916886
Vues:
30
>The program, as its currently setup, does the calculations as fast as it can. Depending on the speed of the computer the model will run slower or faster. This is I think what you want, instead of having a set time when the calculations are run.

When I wrote about calculating every second vs. every day (for example), I was referring to the time you are modelling.

If you do calculations once a day, I do NOT mean a Timer on the executing computer, which will fire after one day. Rather, the position of the Earth (for instance), and its acceleration due to the Sun's gravitation, is computed now, and then again in 24 hours. The calculation could be done immediately, or in a few seconds, depending on the time-scale the user selected.

You can certainly do the calculations every second - "as fast as you can", but if you want to quickly get an overview of the orbit of Sedna, it would become unmanageable, even on the fastest computer: Sedna goes around the Sun once every 10,500 years, so you would need some 331,000,000,000 calculations for a full orbit...

If you do the calculations once every 24 hours, you only need 3,830,000 calculations. Even one calculation a year should give reasonable results, for this particular case.

>I wonder if it would be necessary for something like the following:
>
>A two tiered model, one simply crushes the numbers and puts them into a DBF. This has the position and speed of each object. The second one is able to "play" this data like its a movie, being able to slow down, speed up, rewind, zoom, and what have you.

I think objects in memory, as you did, are OK - except for the rewind part.

>If you had two threads running (in VFP's case it would have to be two different EXEs accessing the same DBF) you could be populating the objects as fast as possible and viewing the model graphically at whatever speeds you'd need.
>
>This is particularly cool because you could build a SETI-like distributed application to crush the numbers for research far more easily without wasting any cycles on the graphics side.
>
>Hehehe. The plot thickens.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform