Curves (lines & paths)

A curve is a row of points strung together into a stroke — the backbone for hair, ribbons, trails, motion paths, and shape outlines.

What a curve is

Start with points — a list of positions, each one a row. A curve takes those points and connects them in order into a single continuous line. The points are still there (you can read and edit @P on each one), but now they describe a path rather than a loose cloud.

That one idea covers a lot of ground in DNA:

Curves can be smooth (gentle bezier bends between points) or straight (point-to-point segments). Either way, the points are the control — move a point, the curve follows.

Open vs closed

Every curve is either open or closed.

Closing a curve matters when you want to fill it (a closed loop encloses an area) or sweep a solid tube with no open end. Many nodes expose a simple closed toggle to switch between the two.

Curves, shapes, and geometry

Curves sit between two neighbours you'll meet elsewhere.

Analytic shapes — a shape.circle, shape.rectangle, or shape.text with the Analytical toggle on — are crisp, resolution-free 2D paths. They are curves under the hood, so you can feed a shape straight into a curve operation. DNA handles the conversion for you, automatically.

Geometry is the other side: a curve is a one-dimensional line, while geometry is a surface built from connected faces. The bridge between them is sweeping (below) — run a profile along a curve and you get solid geometry.

Whether a curve draws as a flat stroke, a rounded tube, or a camera-facing ribbon is a display choice made when it renders — the stored curve is the same either way. See Rasterizing for how strokes are drawn.

Working with curves

A handful of operations come up again and again.

Resampling changes how many points sit along the curve without changing its shape — add points for smoother deformation or detailed effects, or thin them out to lighten things up.

Trimming keeps just part of a curve — the first 60%, the middle stretch, whatever you need. Pair it with animation and you get a line that draws itself on over time.

Sweeping runs a 2D profile along the curve to build something solid. With geometry.sweep you can:

A tube sweep stays a lightweight curve that draws as a 3D tube; the other modes build full geometry you can light and shade.

Any 2D shape can be a sweep profile or a sweep path. Draw a circle, set it Analytical, and you've got an instant tube cross-section — no separate setup needed.

See also