How to bend a cylindrical geometry by X degrees at X height (and do it multiple times)

Hi there, i’m working on this pen where i’m attempting to bend a long geometry at X height by X degrees and for X area of effect.

I’ve managed to bend it in a long arcing motion. However i’d like to confine the bend to only a section of the cylinder and not the entire thing. In my main project, the geometry is bent after applying effects like waves, and after extruding it from a bezier curve created in a 2D canvas.

I tried lerping from the original vector to the new vector created by the bend formula, but it creates a sharp hacked off shape at the bend point.

Here’s a pic of what i’m trying to get:


I’ve made such distortions.

Take a look at the code.
Maybe you’ll find something.

//0002 knot / various knots -
see line … 2052 function xyzCalculation() { …


awesome thank you! really interesting stuff. I’m not sure i understand the math yet, but i will keep trying.

it seems like best option will be to use the THREEf like this, but without the time variable:

my_cylinder.createMorphGeometry = THREEf.createMorphGeometry;
my_cylinder.createMorphGeometry( parameters );

Why don’t you copy this example:

but instead of using a triangle or a star as your base shape, you could use a circle.

He needs to bend this:

The profile is not constant along the length of the “cylinder”.

1 Like