Connect Points
Turns a point cloud into a line network — plexus webs, nearest-neighbor meshes, Delaunay triangulations, convex hulls, or a single polyline through the points.
Category: Point Ops Menu path: Point Ops > Connect Points
Ports
| Port | Type | Direction | Description |
|---|---|---|---|
points_in | points | input | Points to connect (Grid, PointScatter, PointAdvect, TrackPoints, …) |
out | shape | output | The connection network. Each connection is an open two-point path (Sequential: one polyline; Hull: one closed outline). Per-vertex curveu + color; per-path length and opacity (when fade > 0). Edge order is the path order — read it as per-path @index |
Parameters
| Param | Type | Default | Description |
|---|---|---|---|
mode | enum | Nearest | Sequential = one polyline through the points in orderBy order. Nearest = each point links to its neighbors nearest neighbors. Radius = every pair closer than radius links. Delaunay = unique triangulation edges (structured mesh). Hull = one closed convex-hull outline |
orderBy | enum | Index | Sequential mode only: polyline traversal order. Index = follow the per-point index order — computed as list position unless something upstream deliberately wrote one (PointAttributes' Index target), which then wins. Input = raw point array order, ignoring the attribute. Ties and points missing from the attribute keep input order |
fromGroup | string | (empty) | Pairwise modes (Nearest/Radius/Delaunay): one side of every connection, as a selection over any attribute or intrinsic. With the default rule (Member) a bare name reads as group membership (> 0.5). Empty = any point |
fromRule | enum | Member | How fromGroup's value decides membership: Member (> 0.5), GreaterThan, LessThan — so From: scale, Rule: Greater Than, Value: 4 selects the big points. Shown once a name is set. Committing an intrinsic (@x) auto-flips a resting Member to Greater Than — "member of a coordinate" is not a thing; @x > 0 is |
fromValue | scalar | 0 | Comparison threshold for GreaterThan/LessThan. Hidden under Member |
toGroup | string | (empty) | The other side of every connection, same triple. Connections are undirected: an edge qualifies if its endpoints satisfy From/To in either order |
toRule | enum | Member | As fromRule |
toValue | scalar | 0 | As fromValue |
closed | boolean | false | Sequential mode only: close the polyline back to the first point |
neighbors | scalar | 3 | Nearest mode only: neighbors per point (clamped 1–16) |
radius | scalar | 150 | Radius mode only: maximum connection distance in px |
fade | scalar | 0 | When > 0, writes a per-path opacity attribute that dims longer connections: opacity = 1 − fade · (length / ref). ref = radius in Radius mode, the longest emitted edge otherwise. 0 writes no attribute |
maxConnections | scalar | 0 | Safety cap on the total connection count (0 = unlimited). A hard cap of 20,000 edges always applies. Capping is deterministic — the same first-N edges every frame |
Expose Channels
None.
How It Works
Duplicate connections are removed (A→B and B→A are the same edge), and every connection gets its own two fresh vertices — a point that appears in five edges contributes five separate vertex pairs, so downstream per-vertex operations treat each strand independently.
The output is built to compose with the rest of the shape toolbox: per-vertex curveu runs 0 → 1 along each connection (arc-length-normalized along the whole polyline in Sequential/Hull modes), per-path length (px) is always written (edge order itself is just per-path @index), and each endpoint's per-point color attribute (if present) is copied onto the strand's vertices — so DrawShape's per-vertex color pipeline renders smooth gradients between differently-colored points.
Usage Examples
Basic: Plexus web
PointScatter → ConnectPoints (Radius, radius 120, fade 1) → DrawShape (fill off, strokeWidth 1) → Output. Nearby points join into a web whose longest strands fade out. Animate the scatter's seed or advect the points and the web re-forms continuously.
Structured mesh
Grid (Jittered) → ConnectPoints (Delaunay) → DrawShape (fill off). A clean triangulated wireframe over the whole cloud — no duplicate edges, no overdraw.
Creative: Trim-revealed constellation
ConnectPoints (Nearest, 2) → TrimPath (animate end 0 → 1) → DrawShape. Every strand draws on in parallel. Add ShapeAttributes (Custom target, Index source) before the trim and use TrimPath's delay attribute for a staggered cascade.
Connect two point sets to each other, but not within themselves
Tag each branch with its own group before merging — PointAttributes (Custom target, name group1, value 1) on one grid, group2 on the other — then:
Grid A → PointAttributes(group1) ─┐
├→ MergePoints → ConnectPoints → DrawShape
Grid B → PointAttributes(group2) ─┘ From: group1
To: group2Only bridges are drawn; neither grid webs internally. The same name in both fields inverts it — From: group1, To: group1 meshes that group and touches nothing else. A group is just an attribute name, so a point can belong to several groups, and AttributeToField("group1") turns any group into a 0/1 mask field for driving other nodes.
The endpoints are full selections, not only group names: From: scale · Greater Than · 4 with To: grp2 connects every point larger than 4 to the grp2 set — no tagging node needed on the From side.
MergePoints keeps each branch's tag intact (points from the other branch read 0 = not a member), so the tags survive to ConnectPoints without any shared naming convention between branches.
Field-driven connection order
PointScatter → PointAttributes (target Index, field_in ← DistanceField) → ConnectPoints (Sequential). The polyline visits points in SDF-distance order — nearest-to-the-shape first — instead of scatter order. Because Sequential follows the index attribute by default, rewriting index from any field (distance, noise, image luminance) re-routes the polyline; animate the field and the connection order re-threads live. Pair with TrimPath for a "grows outward from the shape" reveal.
Tips
- Colors on the input points (via PointAttributes → Color) become per-vertex gradient endpoints on every strand — two differently-colored points produce a blended line between them.
fadewrites standard per-pathopacity, which DrawShape's grouped renderer honors directly — no extra wiring.- The per-path
lengthattribute is plain scalar data: read it downstream (e.g. AttributeToField) to drive stroke width or color by connection length. - Radius mode is O(n²) over the point count; for dense clouds prefer Nearest or Delaunay, or set
maxConnections. - Sequential +
closedis a quick "connect the dots into a loop" — pair with ResampleShape → ShapeSmooth for a smooth blob through the points.
Related Nodes
- CloneToPoints — stamps geometry at points; ConnectPoints draws between them
- LabelPoints — annotate the same point streams with text
- TrimPath — animate the strands drawing on/off
- PointTrail — same open-polyline output conventions, but through time instead of space
- DrawShape — renders the network (per-vertex colors, per-path opacity)