Hello,
I want to change the color of particles according to their distance to each other via "pop wrangle". This is my approach but its not working as expected. Unfortunately i have no errors or something like that so I cant get any further. If somebody has a hint for me it would be much appreciated.
kind regards
Jon
vector pos;
vector col;
float maxdist = ch("distance");
v@Cd = set(0,0,0);
int handle = pcopen(0,"P",@P,ch("searchDist"),chi("maxPoints"));
while ( pciterate(handle) ){
pcimport(handle,"P",pos);
pcimport(handle,"Cd",col);
if( distance(@P,pos)< maxdist) {
col = set(1,0,0);
}
}
colorParticlesAccordingToDistance.hipnc