|
|
First of all thanks Jelby for that link in the other thread. I went to it,
but it was a program in some other language. I'm one of those idiots who's
not only unable to program in anything in but povray but also
philosophically chooses to do number crunching in the program. (Yeah, I
know, povray is a raytracer, not a physics software language [take it easy,
McCoy ]).
I think some of you were answering the question about the conservation of
energy after collisions based on an entire system of particles, or after a
three-way collision. Thanks, but that was not actually the problem of my
interest.
When I tried two years ago, I wasn't able to set up a correct model of the
solar system, (perhaps it might help to say to do an "AI" model?), without
the planets either sinking into the sun or leaving the system altogether. I
think I tried pretty hard, and i could not find a gravitational constant (or
a sufficiently small time slice) where particles didn't do one or the other.
I was wondering if it were the case that one cannot do it with a computer.
By that I mean that as a travel any finite step obliquely across a gravity
well, there's a difference between real life and my model. My model just
re-computes new force at position 2, whereas a real-life particle would
have the gravity acting on it both "instantaneously" and "continuously".
Someone noted way back then that I wasn't conserving energy. I think others
with nice intentions pointed me to theories that were over my head, and I
suspect, not applicable.
Then I saw the concern in Tim's thread about conserving energy and wondered
if there were some trick.
Jelby, in your second post, you offer an interesting idea.
> p2 = p1 + v1*dt + 1/2*a1*(dt^2)
But is fundamentally any different from going to a smaller time slice? And
I was hoping for a solution where dt= one povray frame.
So I'm falling back to three ideas:
1) it is in fact impossible
2) there's some way to do this where you do an actual integration of the
forces as one moves from p1 to p1+v1dt. I hope I'm not too dense and
haven't missed Jelby explaining exactly how to do this.
3) Perhaps there was an algorithmic error on my part. In my earlier attempt,
http://news.povray.org/povray.binaries.scene-files/thread/%3C3A65E45C.907F6BB7%40my-dejanews.com%3E/?ttop=184097&toff=400
#declare actorp[n]=actorp[n]+.05*actorv[n];
#declare actorv[n]=actorv[n]+Grav*(actoravoid[n]);
I was only moving the particles 5 percent of their velocity, because I'd
seen that it made for a smoother curve, and in my head I was thinking it was
like miles/s and the frames were just seconds. But perhaps I lost
responsiveness (and gained energy loss) from this technique. I'm doing
some experiments now with this set at 1.0
Thanks for all your consideration and interest.
Post a reply to this message
|
|