# Kangaroo - Rotate object held in place by collision & springs

OK, so I’d like to tilt the selected strange object, but preventing it from sinking into the base (collision) while holding it down in the depression using the (green) springs, or by a mesh (networks of springs) being stretchy. Gravity not to be used since the springs need to hold the objects tight to the base in any orientation.

What would the simplest Kangaroo solution look like (Rhino5) regarding the two cases (by four discrete springs or by a stretchy mesh anchored to the sphere on top and to the base)?

Since this is only a generic problem case the model doesn’t really matter, but if someone would like to construct an example based on this simplistic model I’ll attach the model as well:

Forum_ObjectROM_00.3dm (1.2 MB)

// Rolf

Hi Rolf,

Would the ends of the springs be considered pin joints, so the springs only apply tension/compression forces, or are they fixed in rotation too?
Am I right in thinking the bottom of the shape should be free to slide around within the depression? Or does it only roll?
If it slides, I suspect the behaviour of this system might be quite dependent on the friction at this contact point, and friction in Kangaroo is not very developed at the moment.
Once you have this set up, what loads would you want to apply to it, and what is the end goal?

Tension only, strving to hold the object down in the depression.

No, free to rotate, restricted by the tension.

Slide around yes (hence the two different radiuses, no fixed center of rotation that is)

Very low friction, I think it doesn’t really matter in my case.

Athough realism would use some friction, but finding the range of motion is my primary goal.

What I didn’t put into this model from start was the fact that the bottom radius on the cylindric object actually can have two radiuses. Taken to the extreme, a torus fitted down in the depression instead of the cylinder with its ball tip would illustrate that. A torus would have the “big circle” of say, the same radius as the ball has now, and a smaller radius for the torus body.

Fig. Added a torus kind of shape :

Forum_ObjectROM_01.3dm (1.6 MB)

I would primarily try rotate the object in different ways, possibly applying attractors to the handles as to study where it goes under different circumstances. One goal is to study the range of movement, even adding more obstacles (meshes) around it to collide with.

With two radiuses (the torus kind of object) then even without friction, the “center of rotation” would make some interesting movement patterns. I would record the center position at each increment during a movement simulation in order to find out the limits of the Range Of Motion (ROM). Perhaps using Galapagos or the alike to drive motion.

The recorded ROM then to be used as constraints when turning and twisting the handles within the limits that has been “learned” from, the simluations. I would have multiple cases vidth some variations in shapes, thus using meshes for collision test at all times…

But primary goal is to make the object stay in the depression during motion (rotation in all planes).

// Rolf

I came to think of that if total lack of friction would pose a problem (sudden slippings etc), one could attach a spring-net to the bottommost point of the object to be rotated with a very loose tension force in the net ( mimicking “very low friction” ).

// Rolf

RigidBody_springcollide.gh (23.1 KB)
Here’s a start for how to set this up.
If the springs are too tight and the bowl too shallow, it does tend to slide the object out of the depression.

Thank you very much. This is exactly what I needed to get started.

// Rolf