# Kangaroo gets sticky to edges

Hi,
I am trying to run simulation where all particles reach target but it starts sticking to edges after colliding. Is there a way to prevent this? even if I add obstacles in middle it sticks to it. Please help to resolve this

collisions example-02.gh (23.3 KB)

delete your anchor node. You basically anchored all points to each other.

hope this helps

@benedict I used anchor and target so all anchor points move towards target in a closed polyline. If I remove anchor then points are not moving towards target

in this case you should not connect all the points to anchor, but the attractor point.

however, is this what you wanted?
collisions example-02_re.gh (12.0 KB)

@benedict no, I need points move to target not moving down with forcesâ€¦ Even here it sticks to sides

I think I got it, just itâ€™s a bit tricky with the weights and number of points:
collisions example-02_re2.gh (14.4 KB)
EDIT: this is the better version:
collisions example-02_re3.gh (13.9 KB)

@benedict thanks for this, increasing force indeed helps but still not good enough for funky/sharp shapes
collisions example-02_re4.gh (23.4 KB)

Is this supposed to be some sort of interior pedestrian flow/fire egress type simulation?

Using Anchors like this is effectively like having an elastic band between the target and the current position of the points, and you can imagine how this can lead to points getting stuck in corners.
It isnâ€™t pulling them along a viable route, but in a straight line (through walls etc) towards the target.

If you did want to model this I think it could maybe work to generate a vector field first using heat flow, then have them pulled along that.

@DanielPiker Yes Daniel, it is of the same type. May I know how the heat flow is done?

Hereâ€™s an example with a goal which pulls the points along a vector field on a mesh. The vector field is generated using a version of the heat script I previously posted here.

10 Likes

Thank you very much for this! You are the greatest of all Time!!!
I will refine it. Meanwhile is there a way to track velocity of these particles?

Ok found a way with recorder but still approximateâ€¦ Recorded 2 data and find difference and multiply it with number of points it generates within a meter

If you graft before the data recorder you get a list of positions for each particle on a separate branch, so can get the speed by comparing consecutive items.

(also, I imagine this goes without saying, but please donâ€™t think of this as in any way realistic modelling of human movement, itâ€™s just particles following a field and colliding).

1 Like

Thanks Daniel! that is how I used earlier as wellâ€¦

How do you trap moving points that is coming out of kangaroo solver. I have closed polyline and if point comes inside it should be removed or refrained from moving further. I could detect points but couldnt stop its movement

I think I see what youâ€™re getting at - so like an exit zone and when a point goes inside this it gets removed from the simulation, instead of a crowd building up at the target point?

It isnâ€™t possible for a Goal to actually remove a particle, but I suppose we could create a Goal that moves any particle that enters a curve to some location and anchors it there.

Like this:
ExitZone.gh (25.2 KB)

Its good that you used curve but input is 200 and output is also 200. What I did so far is record index of points from solver and whichever points are coming inside curve I cull them from list. Though point is removed from visual it still moves. But whatever I culled is removed from entire crowd