Bend cylinder on specific path

Hi,

I’m trying to bend a cylinder I made with CylinderGeometry on a specific path (I have x, y and z) like the picture in this question. Is this possible?

Untitled

You can quite probably do it with some simple math, but since it’s already there - maybe CurveModifier will be helpful?

1 Like

It goes something like this example;

How to create sine-wave groove in ring geometry with extrudegeometry? - #6 by prisoner849

https://jsfiddle.net/prisoner849/8bw94cs3/

A variation of this:
BeginnerExample
// … step 05: modify a standard geometry

You can find the arrangement of the vertices there:

three.js/CylinderGeometry.js at 350f0a021943d6fa1d039a7c14c303653daa463f · mrdoob/three.js · GitHub
line 73 …

2 Likes

Hi!
You can bend a geometry at your will, using some maths: https://jsfiddle.net/prisoner849/6a7xm77w/ (this is one of my old examples, written for THREE.Geometry, but now I made it work with THREE.BufferGeometry)

3 Likes

I felt like bending them like this2021-02-10 20.18.14

SpiralFromCylinder

With my addon THREEf you can also bend cylinders and create spirals among other things.

Addon. Produces almost infinite many time-varying geometries with functions

see form library THREEf.js

1 Like