Line

A line segment between two points.

What it does

Line draws a segment, or a flat curve, between a Start and an End point. In its default Line mode it is two points and a stroke, and like Circle and Rectangle it is an analytic shape by default: crisp at any zoom, composited as a flat 2D layer. Mode set to Arc, Spiral, Wave, or Zigzag turns the same two endpoints into a parametric curve instead of a straight segment.

Fill and Stroke work as they do on the other primitive shapes: paint them directly or wire in a Fill, Stroke, or Color node. Turn Analytical off to convert the line into a mesh for the 3D scene, or set Render Mode to Tube to sweep a straight line into a 3D tube ribbon that preserves depth.

When to use it

ParameterTypeDefault
modeString"Line"
startVec2(-50, 0)
endVec2(50, 0)
resolutionNumber64
turnsNumber3
radiusNumber100
arc_bulgeNumber40
amplitudeNumber30
frequencyNumber4
fillOneOf([Color, FieldOf(Color), ColorArray, Field, Material, MaterialArray, RasterArray])rgba(0.00, 0.00, 0.00, 0.00)
strokeOneOf([Color, FieldOf(Color), ColorArray, Field, Material, MaterialArray, RasterArray])rgba(1.00, 1.00, 1.00, 1.00)
stroke_widthNumber2
render_modeString"Path"
analyticalBooleantrue
positionVec3(0, 0, 0)
rotationVec3(0, 0, 0)
scaleVec3(1, 1, 1)
anchorVec3(0, 0, 0)
opacityNumber1

Gotchas

Render Mode "Tube" only takes effect when Mode is also "Line". With Mode on Arc, Spiral, Wave, or Zigzag, the line renders as a flat 2D curve regardless of the Render Mode setting.

Resolution, Turns, Radius, Arc Bulge, Amplitude, and Frequency only matter when Mode is Arc, Spiral, Wave, or Zigzag. They are ignored while Mode is Line, since a straight line is its two endpoints.

The curved modes are polylines, so raise Resolution for a smoother Arc, Spiral, Wave, or Zigzag.

In Tube render mode, a fully transparent Stroke makes the tube fall back to Fill for its colour.

Worked example

  1. Add a Line. Drag Start and End to place the two endpoints.

  2. Raise Stroke Width and set a Stroke colour for a visible line.

  3. Set Mode to Arc, Spiral, Wave, or Zigzag to bend the segment into a curve, and raise Resolution for a smoother result.

  4. For a 3D connector, keep Mode at Line and set Render Mode to Tube.

  5. Turn Analytical off for the line as a mesh, for simulation or a 3D scene.

See also

Circle · Connect Points · Pen · Sweep