How to modelize a centrifugal force

Hi all!
I was wondering how to modelize a centrifugal force with Kangaroo2?

I would like to draw a tree graph by scattering the nodes away from one of them.

When I use the SphereCollide component, the nodes are dispatched on the plan but with a lot of overcrossing links and I hope minimizing those crossings by pushing all the branches away from one anchor point…

Thank you for your ideas and your help!

PEB.

Check this topic out by @Bruce_Shapiro

https://discourse.mcneel.com/t/modeling-rotating-hanging-bead-chains/95858

I think @user3118 isn’t actually talking about dynamics in that sense, so maybe that discussion isn’t so relevant.
It sounds like they’re asking about a general repulsive force for distributing the nodes of a graph. Is that right @user3118 ? A sketch of what you’re after and/or the file of what you have would help us help you better.

1 Like

Thank you @martynjhogg!
But I’m would prefer a less dynamic solution :wink:

1 Like

Hi Daniel. Thanks for your message. I’ve tried to emulate the force by mixing an OnMesh constraint (on a cone) and a gravity force… But not sure it’s the best way, especially with more complex trees.

try.3dm (40.9 KB)
try.gh (7.0 KB)

Constraining them on a cone with a gravity force is a novel idea.
For more general and much faster repulsion try this:
graph_repel.gh (19.8 KB)
forcedirectedgraph

There are several parameters you can vary to get different styles of result-
the exponent/range/strength of the repulsion, length of edge divisions, and the type of tension for the edges (spring or constant tension)

2 Likes

Thanks a lot! I’ll have a deep look to your .gh an play with it…

Hi @DanielPiker! Just a short question: could you tell me why the two rigid bodies move together in the joined example when I grab&move one of them? Is there a way to input a massive number of rigid bodies - with specific attached points for each of them - in a single “rigidbody” component while being able to grab&move each of them separately? Thanks a lot. Pierre-Emmanuel.
01-14-try2.gh (9.6 KB)

Are you sure you actually need rigid bodies?

If you just want to move some geometry to the location of points from the solver like your file, you can do it more simply like this:

movegeometry.gh (11.8 KB)

Hum… I do need rigid bodies. My file was just a try with two rigid bodies fed into the same component. Actually, I have a list of rigid bodies with a list of corresponding attached points. And I would like to feed one single “RigidBody” component with those lists rather than defining one component per body. Is that possible with this component?

Yes, to do this your inputs need to follow the data matching.
Note that the Points input parameter is type ‘Points as list’.
So if you have a list of points for rigid body A, and a different list of points for rigid body B, and you want to use a single component, you need to keep them on different branches.
rb_pts.gh (16.1 KB)

When you were feeding in a flat list of bodies, and a flat list of points, it was attaching all the points to each of the bodies, so the bodies moved together because they shared all these points.

This data matching isn’t something unique to Kangaroo, it’s the same way other Grasshopper components with list type inputs work.

Thanks a lot @DanielPiker! I have to say I am not a master in tree/list management…

I’m very sorry but I can’t find what is wrong in the joined file…
01-14-try4.gh (7.9 KB)
I’ve tried to mimic yours but…

I eventually found the problem : the RigidBody component prefers volume meshes rather than surface meshes.