Distance between particles
Posted: Mon Feb 05, 2018 7:21 am
Hello!
According to the Help of Realflow distance between particles can be found like this: radius = 1.0 / (1000.0 · Resolution^1/3) (in meters)
So, for resolution 1.0 distance is 0.001. For the resolution 2.0 distance is 0.000794.
Emitter is a square, 1m*1m.
When I calculate the distance with a script like this:
dom = scene.get_PB_Emitter("Square01")
p_1 =dom.getParticle(1)
p_2 =dom.getParticle(2)
pPos_1 = p_1.getPosition()
pPos_2 = p_2.getPosition()
Dist = pPos_1 - pPos_2
d = Dist.module()
print (str(d))
scene.setGlobalVariableValue("defDist", d)
(or if I use just d = pPos_1.distance(pPos_2))
the result is always 100 times more then it should be. instead of 0.001 for resolution 1.0 I get 0.1. For resolution 2.0 I get 0.0794 instead of 0.000794, and so on. I've tried it with Dyverso particles and I got the same results.
Am I doing something wrong?
According to the Help of Realflow distance between particles can be found like this: radius = 1.0 / (1000.0 · Resolution^1/3) (in meters)
So, for resolution 1.0 distance is 0.001. For the resolution 2.0 distance is 0.000794.
Emitter is a square, 1m*1m.
When I calculate the distance with a script like this:
dom = scene.get_PB_Emitter("Square01")
p_1 =dom.getParticle(1)
p_2 =dom.getParticle(2)
pPos_1 = p_1.getPosition()
pPos_2 = p_2.getPosition()
Dist = pPos_1 - pPos_2
d = Dist.module()
print (str(d))
scene.setGlobalVariableValue("defDist", d)
(or if I use just d = pPos_1.distance(pPos_2))
the result is always 100 times more then it should be. instead of 0.001 for resolution 1.0 I get 0.1. For resolution 2.0 I get 0.0794 instead of 0.000794, and so on. I've tried it with Dyverso particles and I got the same results.
Am I doing something wrong?