Triangles between lines

how to Build a zigzag line between two THREE.Line3 and then calculate the face indices for the THREE.BufferGeometry?
Thanks in advance

Could you provide an explanatory picture of the desired result and the code of your initial setup?
THREE.Line3 is a Math object of two points. So how it has to help to build faces?

Do you want to build something similar to ProfileSurface ?

From Collection of examples from

In fact, we have a series of lines that are closed lines in three-dimensional space that we want to create as a surface of lines. Need to fill of between lines when growing up or down sequenc of lines. I have a just lines in 3 dimensional space as THREE.LINE3

making surface from closed lines that overlap , fill shapes or faces between the sequence lines, concept as picture attached the last answer .

As @prisoner849 noted, Line3 is only a mathematical tool and does not create a visible form.

Your pictures look like the high lines of a terrain.

If you have certain measuring points for this, you have the lines, of course.

To get the terrain as a surface with the lines on it, you have to create a self-defined geometry. Then additionally the lines.

“Need to fill of between lines when growing up or down sequenc of lines.”

That means, you have to realize a triangulation of an arbitrary outlined surface in 3D space. This is not trivial.

I have done something like this for implicit surfaces and some forms with holes.

Addon for triangulation of implicit surfaces/ forms with holes

This works if you have the gradients to each point.

In your case, it should be possible to determine them approximately from the measuring points - I think - or?

You can see how to draw lines in addition by looking at other examples, e.g.
THREEf geometries r136

2022-02-11 20.52.26

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

1 Like

Thanks for your reply, The attached picture lines made by THREE.Line mesh added to object
The code block related to subject is bellow:

    let coordinatesList = => { return new THREE.Vector3((p.x), p.y, p.z) })
    let  geom = new THREE.BufferGeometry().setFromPoints(coordinatesList);
    // lines
     let matLines = new THREE.LineBasicMaterial({ color: nColor });
    let  lines = new THREE.LineLoop(geom, matLines); 

how about this solution can we calculate faces points thoughts the lines ?

In the general case, it is triangulation. It is not the lines that are decisive, but the points that serve as the data source.

If you have a special situation, you can try to determine the triangles from the points. If the number and mutual position is not correct, you can calculate intermediate values. For the saddle point you can also calculate points for triangles. ( area ?).

Yes, we actually want to create a triangular from the closed lines to create a face for the color, or if there is a solution, to create the middle area between the lines as a shape that fits the color, which creates a surface in 3D space.