Field From Points
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
| Name | Nick | Type | Default | Description |
|---|---|---|---|---|
| Sample Points | P | Pointlist | The input points. | |
| Values | V | Numberlist | The field values at each sample point. | |
| Outside Valueoptional | OV | Number | 0 | The constant value returned beyond Max Distance. Has no effect unless Max Distance is positive. |
| Nearest Points | N | Integer | 5 | Number of nearest sample points blended per query. Higher is smoother and slower. |
| Max Distance | X | Number | -1 | How 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
| Name | Nick | Type | Description |
|---|---|---|---|
| Field | F | Field | The 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.
| Level | Message |
|---|---|
| Error | No sample points supplied. |
| Error | Nearest Points must be at least 1. |
| Error | Sample points and values must have the same count. |
| Warning | Outside Value has no effect unless Max Distance is positive. |
| Warning | The 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
