POV-Ray : Newsgroups : povray.binaries.animations : Stacked Bouncing Balls (MPG, 404 KB) : Re: Stacked Bouncing Balls (MPG, 404 KB) Server Time
19 Jul 2024 03:23:57 EDT (-0400)
  Re: Stacked Bouncing Balls (MPG, 404 KB)  
From: None
Date: 19 Sep 2003 16:06:56
Message: <Xns93FBA3F1767D8None@204.213.191.226>
"Tim Nikias v2.0" <no_lights (@) digitaltwilight.de> wrote in 
news:3f6abd4c@news.povray.org:

> Good work! Parsing times?

Thanks.  Parsing times with only 10 balls are negligeable per frame, 0.1 
sec. or something like that.  I didn't record the total time, but it 
wasn't much.  But my collision detection is very simplified.  Ball to 
ball is simply: if (vlength(ball1 - ball2) < b1radius+b2radius).  And for 
the environment right now (the box) I'm simply putting up boundaries on 
the axes.  I'm not using trace() yet although my ball collision routine 
simply requires a world point and collision surface normal vector, so 
trace() should be easily implemented.  That's my next step, after I fix 
the texture rotation.  Earlier I threw 50 balls in the box for 10 seconds 
(physics time), at the beginning it's almost real time, half way it 
starts to slow down, then at the end, when it's all collisions going on 
it's real slow.  It took the night to run.

> How many steps required to simulate this?

For this spefific one I used 2000 steps per second and there was, uh, 3? 
seconds, I think.  Note that there is 30 frames per second, but I encoded 
the MPEG at 24 FPS, to slighly slo-mo it.

> I'm always interested in the complexity
> of things like this...

When I was at school (a long time ago) the physics of bouncing balls 
really interested me.  This little exercise has brought back that 
interest, it's fun stuff.


Post a reply to this message

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