# Making a pumping tube

so I've got a Bezier curve in the shape of a tube:

This is how I created the tube mesh.

I don't know how best to explain it, but is there a way to make it seem as if the tube is pumping something? Like, a small part of the tube is wider and that wide bit moves down the length of the curve as if something is moving through it? Any help will be greatly appreciated :)

• You can try to do it with Geometry Nodes. May 8, 2023 at 11:42
• I would do this with Geometry Nodes. Now the question for me would be, have you ever used Geometry Nodes or would need a completely basic explanation of how to start, how to give the curve a profile in GN, etc. //EDIT: @PepAndorra My thoughts exactly. May 8, 2023 at 11:42

Try the Cast modifier:

Create an empty, give the Cast modifier to your curve, select the empty as Object in the modifier, set the good Radius:

• The only problem with this solution is when it comes to narrower bends, for example in your animation where the tube ahead of the bulge is squeezed, because of how the modifier works. May 8, 2023 at 13:03
• @Gordon Brinkmann could you please show me what you mean? blend-exchange.com/b/JEk9Pozn May 8, 2023 at 13:08
• Here are stills from your gif, on the left you can see how the proximity of the empty instead of simply making the tube wider in certain parts squeezes it down to make it spherical, on the right is what I would expect if I wanted to make the tube wider: squeezed tube. And this is just your example. If the curve would bend more and the OP maybe wanted even wider bulging, the tube would get much more deformed: deformed tube May 8, 2023 at 13:39
• @Gordon Brinkmann oh ok I see May 8, 2023 at 13:44
• The problem is, so far I have not found a satisfying solution for Geometry Nodes either. Although it does not have the problem of the Cast modifier, narrow bends will still not look really good. May 8, 2023 at 13:51

You can also deform the tube with a "arbitrary" mesh.

Kind of "le petit prince" but with Suzanne:

Using geometry nodes:

The idea is to make a curve with a radius that is smaller than the object that is going in.

Then change this object to its convex hull.

Then raycast the curve (to mesh) along normals to the object convex hull.

Either the mesh is hit and the curve is deformed to the object.

Or it is not and the curve is deformed to its wanted radius.

• I thought.. 'Barbar the elephant, surely? ' But a quick search proved me wrong. Completely forgot that bit. It's time to read Le Petit Prince again, again. A work of genius. May 8, 2023 at 21:16

This GN approach expects a plain, un-bevelled curve as input:

It lets you set the shape of the pulse, and animate the diameter of the bevel, the pulse's position, length and diameter.

.. looking back at this, you may also want to expose the curve's resampling length, to make the group more adaptable to scale.