Skip to main content

Line

WLJS
Wolfram Kernel
Execution environment
Supports dynamics
Line[{{x1_,y1_,z1_}, ..., {xn_, yn_, zn_}} | indexes_List]

represents a line in 3D space.

Graphics3D[{Black,Line[{{1, 1, -1}, {2, 2, 1}, {3, 3, -1}, {4, 4, 1}}]}]

Parameters

RGBColor

AbsoluteThickness

Indexed geometry

The most efficient way of using Line for many vertices is to wrap it into GraphicsComplex. It provides the list of vertices as a separate list, while Line contains only the indexes for a line

v = PolyhedronData["Dodecahedron", "Vertices"] // N;
i = PolyhedronData["Dodecahedron", "FaceIndices"];

GraphicsComplex[v, {Black, Line[i]}] // Graphics3D

Dynamic updates

It does support updates. Use Offload

tip

Updates of geometry using GraphicsComplex is more efficient for many vertices

warning

Changing the length of an array of points is not supported!