Hi Forum,
Is there a reasonably way to measure the distanse between particles in the same particle-object?
Best, T.
Hi Forum,
Is there a reasonably way to measure the distanse between particles in the same particle-object?
Best, T.
No! or well you could do some sortinga according to distance but its very heavy and you need to do it manualy. so i suggest you do a plug in c for this its faster (since this is a heawy operation).
Thanks, but this cannot be true??
Cannot MEL handle this operation? Are you 100% sure?
Something tells me it can, but that it will be very prosessor intensive.
Isnt it possible using FOR-loops, array-sorting and possibly matrices?
Best regards, T.
Im asuming you mean expressions, mel is a different beast.
Sure, the distance between 2 points is sqrt((x.1-x2)^2+(y.1-y.2)^2+(z.1-z.2)^2). But you need to sample each particle for each particle so its noparticles^2*9 parsed operations! so its going to be very slow with multiple particles so id say over 100 particles and youll be screwed (unless offcourse you can afford to calculate for very long).
On the otherhand theese calcs will couse some additional problems sice (i asume you actualy want to use the data for the particles themselves), you will probably end up iterupting the code with soem getattr command and this in turn will slow it even more.
On the otherhand you could do a plug that manages this on a deeper levell wich in turn means you could do some memory tree oerations to speed things up and discard unwanted data (for example if you only need the closest ones etc.)