# Triangles between lines

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

Hi!
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 discourse.threejs.org

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.

To
“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

1 Like

The code block related to subject is bellow:

``````    let coordinatesList = path.map(p => { 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);