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?
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?
You can quite probably do it with some simple math, but since it’s already there - maybe CurveModifier will be helpful?
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 …
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
)
I felt like bending them like this
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 https://hofk.de/main/threejs/sandboxthreef/formLibrary.html
See also 2022 [SOLVED]Create a spring - #9 by prisoner849