We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOther Libraries › Traer physics library error
Page Index Toggle Pages: 1
Traer physics library error? (Read 1237 times)
Traer physics library error?
Apr 24th, 2010, 11:23am
 
I've run into what seems to be an error with the Traer Physics 3.0 library, could anyone advise if this is an issue with the library or if I'm missing something

I've adjusted the RandomArboretum demo, adding a thread so the tree grows itself over time, and adding a random chance of the new nodes created being added to the existing tree or being unconnected subgraphs. Most of this time it works perfectly, but occasionally the whole graph will be thrown into disarray with particles and edges all over the window.

Here's a screenshot of the applet running normally, and in the midst of a 'crash' (it keeps running while this happens).

...

...

The error usually happens within a minute or two, you can see the applet running and view the source at http://ollieglass.com/temp/autogrow_applet/

I wonder if it is the unconnected subgraphs that are somehow causing the error, but I am not sure. I'd be very grateful for any help or suggestions.

Best wishes,

Ollie
Re: Traer physics library error?
Reply #1 - Apr 24th, 2010, 12:02pm
 
Looks like the system gets unstable. I think you should not see it as an error, but as a kinf of "limitation". Try with ParticleSystem.RUNGE_KUTTA instead of ParticleSystem.MODIFIED_EULER, if you want more stability.

Quote:
Runge-Kutta is the default. It takes about 4 times as many cycles as Modified Euler. In return the system gets very stable.
Re: Traer physics library error?
Reply #2 - Apr 25th, 2010, 4:41am
 
Much better, now I'm getting to around 1500 particles before slowdown and out of heap errors end the applet. No more instability.

Thanks.
Page Index Toggle Pages: 1