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.
Page Index Toggle Pages: 1
new project (Read 1813 times)
new project
Jun 22nd, 2005, 11:24am
 
I'm working on this project, (inspired by JNimoy Ball Dropping)
there's a bug on some bouncing that i can't fix properly:

http://www.stilomatic.net/lab/p.02


thanxs in advance for any suggestion
Re: new project
Reply #1 - Jul 1st, 2005, 11:04am
 
i dont know how it works for others, but it loads in my web browser and ancounters an exception. Heres what java console has to say about it:

Error while running applet.
java.lang.NullPointerException
at com.softsynth.jsyn.SynthObject.<init>(Unknown Source)
at com.softsynth.jsyn.SynthSound.<init>(Unknown Source)
at com.softsynth.jsyn.SynthUnit.<init>(Unknown Source)
at com.softsynth.jsyn.SynthUnit.<init>(Unknown Source)
at com.softsynth.jsyn.SampleReader.<init>(Unknown Source)
at com.softsynth.jsyn.SampleReader_16F1.<init>(Unknown Source)
at com.softsynth.jsyn.SampleReader_16F1.<init>(Unknown Source)
at pitaru.sonia_v2_9.LiveOutput.start(LiveOutput.java:74)
at ball01_6_1.setup(ball01_6_1.java:19)
at processing.core.PApplet.display(PApplet.java:1017)
at processing.core.PGraphics.requestDisplay(PGraphics.java:362)
at processing.core.PApplet.run(PApplet.java:921)
at java.lang.Thread.run(Unknown Source)
Exception in thread "Thread-5" java.lang.NullPointerException
at com.softsynth.jsyn.Synth.stop(Unknown Source)
at com.softsynth.jsyn.Synth.stopEngine(Unknown Source)
at pitaru.sonia_v2_9.Sonia.stop(Sonia.java:123)
at ball01_6_1.stop(ball01_6_1.java:82)
at processing.core.PApplet.run(PApplet.java:985)
at java.lang.Thread.run(Unknown Source)
Re: new project
Reply #2 - Jul 17th, 2005, 11:59pm
 
Oh, I bumped into that a week ago. The problem is that you check if the ball is "close" to a bar, and if it is, you defect it. And sometimes a ball is slow and the new deflected posiion is stil "close" to the bar and it gets deflected again. What you need to do is make sure the reflected position is far enough from the bar to not get reflected again. That shouldn't be too hard.
Page Index Toggle Pages: 1