From: NOSPAMsl AT psycode DOT com (Gili) Newsgroups: nctu.club.astronomy,relcom.fido.su.astronomy,sl AT psycode DOT com,comp.os.msdos.djgpp,gac.physics.astronomy Subject: Re: Orbits, planets, PLEASE HELP! Date: 19 Mar 1998 18:06:48 GMT Organization: Generation.NET Lines: 35 Message-ID: References: <350DFA18 DOT DF98FAE5 AT mail DOT coos DOT or DOT us> Reply-To: NOSPAMsl AT psycode DOT com NNTP-Posting-Host: 205.205.118.33 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk On Tue, 17 Mar 1998 04:20:40, Jason Dagit wrote: > Hello, > > Here is how I would tackle this dilema: > > Perhaps I'm just ignorant (I'm 18 and still in HS) but wouldn't it be > possible to find the paths of the celestial objects simply by applying > the forces of gravity in 3 dimensions? I mean, you can find out the > masses, you know the formula for gravity (or at least it should be easy > to find) and if you can find the velocities and distances you're set. > Of course this would be a very slow and time consuming process to > calculate the gravity equation for all the celestial objects every > second. One optimization would be to consider the ratio of masses and > what the force of gravity was before the distance changed then use that > to find the new force of gravity given a change in distance. Also, I > think to get the right answers you would need to keep all the original > information until you have processed all the celestial objects, then > write over that old data with the new. Perhaps you could store all the > changes in force in a transition matrix and then use that. I'm not sure > about the best/fastest implementation. > > One forseeable (is that a word?!?) problem is that your data types won't > give enough precision. Arbitrary math libs are out there, but they are > slower than intrinsic data types. > > Before anyone calls me dumb for doing it this way, let me say, I've only > had one year of physics and no one else has suggested a way in this ng. Actually, that's EXACTLY the way I'm doing it. It's working, kinda, so far... Umm, what did you mean about my variable types leading to error? Gili