I have been looking for a way, how to divide a group of particles into a few clusters based on the nearest points and then attract them to each other. Second part is to attract the cluster containing a few particles towards a nearest point on mesh.
When working on the first part of the sim I have found on the forum, that POINT CLOUD OPEN in to POPVOP could do the job. I have found then a file from Jeff, where this technique seems to work pretty well. I have tried to recreate that in all sort of way I was capable of, but I am still not getting the same result.
I am a bit confused with the technique - if I understand well, the POINT CLOUD OPEN looks for nearest points for each point and then it creates the cloud if those points and gives the position attribute of its center. Theoretically it can be used then to calculate the vector pointing to the cloud center for each point in the cloud. That vector can be used then as the velocity to move points to the center. Buuuut here the big question……..let's say I have 15 points coming to PCOPEN….it takes first point and counts 3 nearest points and such creates first point cloud with 4 points. Then I could calculate the velocity to the center of the cloud. For now it is fine. But then the PCOPEN takes teh second point from the 15 incoming points and repeat the searching for nearest points and so on. Then I do again the calculation of the velocity. The problem is that the first and second incoming points to the PCOPEN node might be close to each other and thus the point clouds are overlaping. It means the calculated velocities can't never work well and the system can't work. It would work just in case, that the PCOPEN node would remove already processed nearest points in the first round from the incoming points to be yet processed.
Could anyone explain me, how PCOPEN works and how it can be used for the particle attraction in clusters as Jeff has achieved in the enclosed file?
Btw I am trying to achieve simulation, where particle attraction is the key function and for now, I am bit struggling with that. I have enclosed a picture of the simulation I need to create so if anyone would have an idea or an example file how to deal with that, you are all welcome and it would be great help.
Many thanks for any help.
Image Not Found
Image Not Found