How can I make a tube and bend it in run time

Sorry for bother you guys but I am kind of bad in Math, I want to make like a tube and bend it using curve radius in a run time giving some inputs data like angle and distance.

Some one have an idea where and how to start?


Maybe these conversations can get you started in the right direction:

Also, I think @prisoner849 might be able to chime in with other good examples. :wink:

1 Like

Another option:

1 Like

If it is a constant bending radius, or any other bending whose position and rotation offsets can be expressed in closed form, you can have a transform in the vertex shader that takes a straight, axis-aligned tube and transforms it to the desired bend, before applying the projectionMatrix*modelViewMatrix. Ideally, you will also find a way to transform normals. (I don’t know how to do that for any specific case, and certainly not for the general case.)

Maybe there’s something for you :question:
Comments unfortunately only in German, but easy to translate with ( I always take).
to the addon see and Addon. Produces almost infinite many time-varying geometries with functions