I’m wondering if there’s a way to simulate the random walk motion of Brownian particles using kangaroo, with the goal of eventually being able to simulate directional “run and tumble” motion, when a particle moves in a given direction and then randomly reorients when colliding with other things. The goal would be to build simulations of emergent collective behavior with certain confinement scenarios and couplings, such as confinement in an elastic ring or a bunch of these particles attached to an elastic strip.
In fact you don’t need K2 (but is doable anyway) for that type of stuff. See a simple demo. Instead of “classic” particles as spheres/pts … boxes are used (for fun) - red pts are the collisions.
Notify if you are familiar with C# (level required: advanced to expert) for some indicative tips.
BTW: You can cheat (a bit) with various other ways (Note: in this demo the propability for escaping the boundary is user controlled). Is rather very hard for an observer to tell if this is some sort of physics (kinda) or 100% cheating.
@PeterFotiadis these are really interesting! Would you be able to elaborate a bit more on how you made these simulations and/or share your file?
These are internal stuff - but I can provide tips/help towards some solution. They are done 100% via C# code (the cheating part is a recursive grow on fake things that look … “realistic”).
So the question is: 1 to 10 what is your C# level?
BTW: for the 1st demo you’ll need to define rnd items of a custom Type via a Class containing Properties suitable for the scope like:
… then the 2nd C# (required since the collection is random) reads the items and calculates new positions and/or collisions/reflections (per time “tick”: param name “loops”). “Kinda” a kind of N-Body problem (without the gravity part).
If C# is not your game you should wait until some good Samaritan can provide a K2 based solution.