www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/19/16:46:01

From: jack_h_ostroff AT groton DOT pfizer DOT com (Jack Ostroff)
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 20:33:32 GMT
Organization: Pfizer Inc, Central Research, Clinical Systems Development
Lines: 65
Sender: ostroj AT groton DOT pfizer DOT com (Jack Ostroff)
Message-ID: <6erves$npa2@mascagni.pfizer.com>
References: <bWLoegW7sFse-pn2-nOBQTFs4XI88 AT portA01 DOT Generation DOT NET> <350DFA18 DOT DF98FAE5 AT mail DOT coos DOT or DOT us> <bWLoegW7sFse-pn2-WENiqrkgL4id AT portA23 DOT Generation DOT NET>
NNTP-Posting-Host: gsun150.pfizer.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

[posted and mailed to original poster]

In article <bWLoegW7sFse-pn2-WENiqrkgL4id AT portA23 DOT Generation DOT NET>, NOSPAMsl AT psycode DOT com (Gili) writes:
> On Tue, 17 Mar 1998 04:20:40, Jason Dagit <thedagit AT mail DOT coos DOT or DOT us> 
> 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
This method works as an approximation only.  The further you project, 
the larger your cumulative error will become.  To fully understand the
reasons for this, you need at least a bit of numerical analysis and perhaps
some chaos theory.  (There are probably books on both topics understandable
at a high school level, but I don't know of any.  Check with your math
teacher or school/local librarian.)

The main problem is that any digital computer method of attacking this 
problem uses numbers stored with a limited precision.  Every calculation
you do has a potential error as large as the finest bit/digit of
precision in your storage.  (This explanation is perhaps a bit 
sloppy, but it should get the point across.)  These errors accumulate
and grow every iteration.  Using smaller time intervals and higher 
precision gets you more accurate results, but at a cost of excessively
slower calculations.

However, don't give up hope.  Accurate equations for these things have
not been discovered for more than two bodies.  (Look for references on 
the "three body problem" for more history, which should also provide
leads on computational methods.)

Good luck.

Jack (jack_h_ostroff AT groton DOT pfizer DOT com)
 (the legal message below, if present, is automatically added by my
  corporate firewall.  There is nothing confidential in this message,
  which can be redistributed freely.)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019