# Inflate ball

Hey guys, i trying to learn kangaroo, and one of the exercises im trying to complete is this: inflate this ball but keep it hold by the ring arround it, so it performs a deformation. But i just cant make it work properly, can someone hellp me? thanks.inflateball.gh (41.2 KB)

I’m by no means an expert in Kangaroo2, but I came up with a rather simple solution to your problem.

Instead of generating a NURBS torus, converting it to a mesh and trying to collide it with a mesh sphere, I simply look for the sphere vertices to keep fixed (that would be kept stationary by the ring) and define those as K2 point anchors. More or less anchor points can be selected with the `SelectionTolerance` slider.

inflateball_V2.gh (21.9 KB)

3 Likes

See attached as well

K2_Inflate_EntryLevel_V1.gh (11.7 KB)
K2_Inflate_EntryLevel_V1.3dm (209.3 KB)

2 Likes

I agree with @diff-arch above that it is much simpler to do this not with collision between the 2 meshes but by anchoring a ring of points.

However, if for some reason you did need to do it with collisions, your original definition was not far off - the main thing that needed changing was to switch the ‘Unidirectional’ option on in the collision goal. This makes sure the ring is a passive collider and does not move itself. I also increased the thickness of the ring a bit - if the mesh is too coarse relative to the thickness of the collision object, they can pass right through each other.
inflateball_collide.gh (35.2 KB)

edit - just realised this is just what @PeterFotiadis showed above.

2 Likes

Its perfect folks, thank you so much!

1 Like

Is there a way to inflate the ball and keep it within the ring, but without anchoring any points to the ring (as in @diff-arch 's example)? My guess would be to use anchors of some type.

Do you mean with just collisions, or keeping points attached on a ring but free to slide along it?

With collisions, I think once both sides expand beyond some amount the ball will be held in place by the ring, (like a belt on someone who ate too much christmas dinner!)

but before that point is reached and the ball is only slightly larger than the inside of the ring, any asymmetrical forces can cause it to pop out on one side. To stop it sliding out but without actually attaching it using OnCurve or Anchors, you could use the friction goal I posted here.

6 Likes

I think the friction goal is what I’m looking for. I’m have a similar use case where I’m inflating a bladder underneath a staircase, but because of the geometry, it’s popping out on one side after inflating to a certain point.

1 Like

can i ask how to describe the inflatable like this shape?

Did you use the search function yet?

Search results for ‘@danielpiker inflate’ - McNeel Forum

The example linked below is not exactly like yours but it has a few similarities and you might also find hints how to build the base mesh for a floatation device without holes.