Hi,
On Fri, Jul 09, 2010 at 07:18:22PM +0200, cyrille henry wrote:
a MSD link in pure vanila pd, that would be awesome!
I did run [physigs] on the iPhone with RjDj already and even with the link-force-distribution made with messages, it's no problem to run a chain for scanned synthesis that is 256 points long or longer.
i had the same problem when doing the PM on a GPU shader. the solution was to hard coded the link topology in the shader. so it does not help you to create a generic solution...
for physigs i think the solution is the look at the problem the other way around. do not have link oriented table, but mass oriented. i.e : if you wish to connect masse 22 and mass 33 , you have to create a conection1 table that could have 33 in the index 22 and 33 in the index 22. then sending connection1 to a code that compute the link.
you can have an other table to compute a 2nd link with other parameter. all of the links contribution will then be summed with a simple "+~"
of course this is very inefficient if you have 10000 masses and 2 links, since you have to compute forces for all masses. but if all mass n are connected to mass n+1, then all link can be computed in only 2 times. the only optimisation you're missing is that F(1->2) = -F(2->1), so you have to compute 2 time the same link. but this is negligible regarding to the performance boost you'll get...
do you understand my point, and do you think it can be done?
It's a good idea, I will try this. When I hit the wall with my current approach, I already thought that probably I'd need to try some different approaches on the level of the basic data structures used. Actually that's the nice thing about the BSP idiom described in my paper: It is all patched in Pd without any compiled externals used, so it's very easy to try out different optimizations or algorithms for a "normal" user. It's also possible to design "un-physical" modelling systems that violate the usual Newtonian rules or to get specific meta-information like center-of-gravity of link-forces or so very efficiently and use these meta-infos to drive other processes. The latter made me start a little feature extraction library similar to William Brent's timbreID/tabletool objects, but with a vanilla taste to use in RjDj or similar environments.
I also started to clone your pm-mapping objects, see attachment, which probably uses some list-abs and rj objects (http://github.com/rjdj/rjlib) IIRC.
Frank