# How to loop this task?

**URL:** <https://discourse.mcneel.com/t/how-to-loop-this-task/82811>\
**Category:** Grasshopper\
**Tags:** rhino, grasshopper\
**Created:** [May 4, 2019, 7:15am UTC](https://discourse.mcneel.com/t/how-to-loop-this-task/82811 "2019-05-04T07:15:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![parasdeepsingh](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/parasdeepsingh/32/299734_2.png) [@parasdeepsingh](https://discourse.mcneel.com/u/parasdeepsingh)\
**Post date:** [May 4, 2019, 7:15am UTC](https://discourse.mcneel.com/t/how-to-loop-this-task/82811/1 "2019-05-04T07:15:11Z")

</div>

[Gravitational field.gh](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/4/1/416dd14347369d595a0a25b90c4c2cfd88f55605.gh) (13.5 KB)

So, there’s an attractor point which is still. There is another point which moves along the y axis but its movement is also influenced by the attractor point’s attraction.

I can do this movement once for a unit length. But I want to do it repeatedly and interpolate the different positions of the point to form a curve. How do I do that?

I have highlighted the area of the grasshopper file which I want to do repeatedly.

Thanks

---

<div class="post-metadata">

**Author:** ![Michael\_Pryor](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/michael_pryor/32/489117_2.png) [@Michael\_Pryor](https://discourse.mcneel.com/u/Michael_Pryor)\
**Post date:** [May 4, 2019, 7:37am UTC](https://discourse.mcneel.com/t/how-to-loop-this-task/82811/2 "2019-05-04T07:37:13Z")

</div>

Look into plugins like Anemone

---

<div class="post-metadata">

**Author:** ![diff-arch](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/diff-arch/32/528268_2.png) [@diff-arch](https://discourse.mcneel.com/u/diff-arch)\
**Post date:** [May 4, 2019, 7:40am UTC](https://discourse.mcneel.com/t/how-to-loop-this-task/82811/3 "2019-05-04T07:40:49Z")

</div>

Judging from your [other thread](https://discourse.mcneel.com/t/how-to-make-this-gravity-simulator/82805), you seem to be after an agent-/particle-based system. I’ve listed some options, available in Grasshopper, [here](https://discourse.mcneel.com/t/curve-moving-along-mesh-along-vector-field/82575/2).
