Skip to content

node closest points

Blossom Merz edited this page Oct 30, 2026 · 4 revisions

Home > Data > Closest Points

< Previous: Distance | Next: Area >

Node Library

Closest Points (node)

Where two things come nearest: a point on each, and the distance between them. A region measures to its outline, including from inside it.

Closest Points node diagram

Category: Data | Add menu: Data > Closest Points

The measure twin of Distance, which answers only for two points. This one takes anything: a point and a curve, two splines, a field of dots and an outline. It hands back both ends of the gap as points, so wiring them into a Segment draws the connector. You see where the nearest approach is, not only how far it is.

Inputs

  • From (any): the thing, or things, being measured.
  • To (any): what they are measured against.

Outputs

  • From Point (point): the point on the From side where the two come nearest.
  • To Point (point): the matching point on the To side.
  • Distance (number): the gap between those two points.

A region measures to its outline

Always, and that includes from inside it. A point inside a shape gets a positive distance to the nearest edge rather than zero.

That is what makes this a thinness measure: how narrow a band is at its narrowest, or how close an inner outline comes to an outer one. A node that answered zero from inside could not tell you that.

From is split, To is taken whole

The two sides are not symmetrical, and it is worth knowing which is which.

  • From is split into items, the same way the rest of the library counts one thing, so a region and its holes are measured together rather than as separate shapes.
  • To is taken as one thing, whatever is wired into it.
  • A list in gives a list out, item for item: one answer per item of From, each measured against the whole of To. So a whole field of dots can be probed against an outline in a single node.
  • An item with nothing to project from falls back to its centroid. An item with neither curves nor points has no centroid either, and is skipped rather than guessed at.

How exact it is

Lines and arcs are answered exactly. Splines are converged, and every projection goes through the same function the Pen uses to insert an anchor on a spline, so this node and the Pen can never disagree about where a curve passes closest to a point.

Two curves that do not cross are measured exactly. The distance used to be approximate there; on one measured pair it read 74.376 where the answer is 63.285. Where they do cross it reads zero exactly, and straight edges and arcs were always exact.

This is contained to this node on purpose. Dragging an anchor, inserting with the Pen and Slide to Extreme are untouched.

Related

  • Distance: two points, straight line, nothing else.
  • Nearest Point: one point projected onto one thing, when you already know which side you want.
  • Area: the other measure on this flyout.
  • Data nodes: the rest of the category.

< Previous: Distance | Next: Area >

Locus Studio Docs

Home

Getting Started

Modeling - Drawing

Modeling - Editing

Annotation

Layers

Modeling Menus

The Nodes Window

Node Library

Clusters

Bridging Modeling & Nodes

Patterns & Symmetry

Image-Driven Fields

Saving, Exporting & Files

Preferences & Language

CLI

Reference

Clone this wiki locally