Field From Points component icon

Field From Points

Nickname FieldFromPointsMorphe › 1. Field › CreateOutputs Field

Creates a field from sample points with associated values using inverse-distance weighting. A kd-tree finds the N nearest samples to each query point and blends their values with modified-Shepard weights, so the field is exact at the sample points and stays smooth as the neighbour set changes. Choose 3D or 2D from the right-click menu: 2D uses XY distance only, so the field is constant along Z. By default, the field interpolates everywhere; set a positive Max Distance to return the Outside Value wherever the nearest sample is farther away than that.

Modes

Choose the mode from the component's right-click menu.

3D2D (XY)

Inputs

NameNickTypeDefaultDescription
Sample PointsPPointlistThe input points.
ValuesVNumberlistThe field values at each sample point.
Outside ValueoptionalOVNumber0The constant value returned beyond Max Distance. Has no effect unless Max Distance is positive.
Nearest PointsNInteger5Number of nearest sample points blended per query. Higher is smoother and slower.
Max DistanceXNumber-1How far from the nearest sample the interpolation still applies. Zero or negative (the default) means unlimited, so the field interpolates everywhere. A positive value returns the Outside Value wherever the nearest sample is farther away than this.

Outputs

NameNickTypeDescription
FieldFFieldThe output field.

Example definition

A field interpolated from random points
Grasshopper's Populate 3D scatters points through a box and Random gives each a value from a domain that spans zero. Field From Points interpolates them into a field, and the surface where it crosses zero, separating the positive points from the negative ones, is bounded by the same box and meshed.
Try
  • Change Points for a denser or sparser cloud; the same count drives the values.
  • Move Value min and Value max: a domain weighted to one sign gives more solid or more void.
  • Change the Seed on Populate 3D or Random for a different arrangement.
Download field-from-points.gh5 KB · Rhino 8 · Morphé 1.0

Messages

What the component may report, shown as a balloon on the canvas.

LevelMessage
ErrorNo sample points supplied.
ErrorNearest Points must be at least 1.
ErrorSample points and values must have the same count.
WarningOutside Value has no effect unless Max Distance is positive.
WarningThe sample points all share one Z height. 2D (XY) mode, from the right-click menu, may be what you want: it drops Z and makes the field constant along it.
Written for Morphé 1.0 · Rhino 8