POV-Ray : Newsgroups : povray.binaries.animations : Re: gravity sim Server Time
2 Nov 2024 07:24:53 EDT (-0400)
  Re: gravity sim (Message 1 to 1 of 1)  
From: bob h
Subject: Re: gravity sim
Date: 21 Apr 2002 05:48:49
Message: <3cc28b01@news.povray.org>
"Barron Gillon" <gil### [at] purdueedu> wrote in message
news:3cb66c05@news.povray.org...
> I was messing with a gravity simulation and came up with a way to avoid
> having particles shoot off at high speed when they get too close; simply
let
> them have no effect on each other if they come within a certain distance.
> In this example the particles have a radius if 1 unit, and ignore
particles
> within five.  I could proably make that smaller.  I admit is IS
inaccurate,
> but it decreases the number if particles that reach escape velocity
> significantly.  Plus, in the big picture, I think it is close enough.  I
> have another animation with the feature turned off if anyone is
interested.
> BTW, my algorithm is very inefficient, being order 2^n.  Does anyone have
a
> better way?  Maybe...  Find the center of mass for the whole system and do
> gravity calculations on all particles from there?

Interesting as is. The final drift seems related to the initial collection,
or the second event anyway. Have you seen it occur randomly (going any
direction) from several runs of this?
The "nothing" thing might be considered a loss of energy quantity. I used to
read about how a loss of momentum could occur through the gain of energy or
loss of energy. I forget, so not really sure. If you could make the drop
variable based on the proximity instead of a complete cut-off that might
prove worthwhile.

bob h


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.