|
|
see video I posted in p.b.a
I'm beginning the process of simulating bubbles in water using my
innaccurate ideas about how physics works. I've started with particles that
attract eachother when too far, and repel when too close.
(eventually I'll add a threshold beyond which particles will no longer
attract eachother.)
The result is pretty good, but that animation took 5 hours to parse total.
so I'll need to find a better way of organizing my program. Maybe I shall
take the lead of Tim Nikias, and simply write all the data at the beginning
and simply re-read the file in, instead of going through the whole
simulation again and again for each frame.
At any rate, I need a method for generating a surface or surfaces from
these clumps of points, and a way of identifying upper most particles to
apply force. I think to identify upper most particles, I can simply add a
point above, and check which particles are closest to that point, However
that has some problems with accuracy.
I could attempt to simulate particles bombarding the top with "water
molecules" but then I'm a bit shady on how I should go about detecting
collisions. (though I have some rough ideas)
as for the surface, I could just use blobs, but they're slow and lumpy. Or
I could try some kind of triangulation algorithem. I could use the same
approach of particle bombardment, and simply note where the colissions
occured. But then how should I determine where one bubble ends and the next
begins?
I thought about identifying groups of air particles by proximity, but the
detailed logistics of that kind of bog me down.
Oh well, I apologize for thinking out loud, but I was hoping to spark some
discussion on the subject.
Thanks, and I hope you enjoy the brief animation.
Post a reply to this message
|
|