Hello! I would like to visualize the following tree schematic:
A
|
B
_|_
| |
C D
I thought of representing the objects (A, B, C and D) as sphere
meshes and the connections between them though fat lines
.
I have a question about how to populate the LineGeometry
object from the coordinates of the points A, B, C and D. As I understand that by stating:
const geometry = new LineGeometry();
geometry.setPositions(points);
const material = new LineMaterial({color: 0xffffff, linewidth: 5});
material.resolution.set(window.innerWidth, window.innerHeight);
const lines = new Line2(geometry, material);
scene.add(lines);
the geometry is created from a list of consecutive points. If I were to provide the coordinates of A, B, C and D in points
object, then C would end up being connected to D, which is not desirable. Does anyone have a suggestion on how the geometry can be differently generated from a list of point coordinates, to allow visualizing such tree representations? Thanks very much in advance.