Diamond Gradient Grasshopper pattern: diamond lattice with openings changing size across a curve

Diamond Gradient

Diamond grid with attractor curve

A diamond lattice whose openings change size as they get closer to a curve, moving from a fine open mesh to a denser screen.

Want all 53 patterns? Get them in one zip →


Price

Free

Plugins

None, native components only

Works with

Rhino 7 & 8, Mac and Windows

Level

Beginner

Inputs

Reference in Rhino

Surface

The surface the pattern is built on. It must be a planar (flat) surface.

Curve

The attractor. Diamond openings close to it are smallest; openings far from it are largest. It can run along an edge or across the panel.

Main Sliders

SliderWhat it changesDefault
Columns
Rows
The grid the diamonds are built on. More columns and rows means more, smaller diamonds.25
30
Diamond Scale Max %How much the openings closest to the curve shrink, from 0 to 1. At 1 they close completely.0.93
Diamond Scale Min %How much the openings furthest from the curve shrink. Low values leave large openings with thin members; at 0 the openings keep their full size and meet their neighbours.0.05
Fillet StrengthHow round the corners of the openings are, as a percentage of the largest radius the script allows.89
Border OffsetThe width of the solid frame left around the edge of the panel.0.05

Also try: reshape the Graph Mapper to change how quickly the openings grow as you move away from the curve.

Notes

  • Swap the values of Diamond Scale Max % and Diamond Scale Min % to reverse the effect: large openings near the curve and a denser lattice away from it.
  • Keep Columns and Rows in proportion to your panel if you want square diamonds. Each diamond spans two grid cells in each direction, so uneven cells make the diamonds tall or wide.
  • The result is a single surface with holes. At the default settings the holes next to the curve are very small; lower Diamond Scale Max % to open them up.

Design Logic

How the script builds the pattern, step by step.

Diamond Gradient Grasshopper script on the canvas
The whole script on the Grasshopper canvas. Open full size ↗
StepHow the script does it
1. Pick the diamond centres in a checkerboardDivide Surface makes a grid of points. Tree Statistics, Tree Branch and Cull Pattern keep every other point, shifted on every other column, so the centres form a checkerboard.
2. Measure the grid spacingList Item, Line and Distance measure the gap between grid points in both directions. Amplitude turns each into a vector one cell long.
3. Draw a diamond around each centreFour Move components copy each centre one cell left, right, up and down. Merge collects the four corners and Nurbs Curve joins them into a closed diamond. Neighbouring diamonds share their edges, so together they fill the grid.
4. Measure each diamond’s distance to your curveCurve Closest Point measures how far each centre is from the curve. Bounds and Remap Numbers turn the distances into values from 0 (nearest) to 1 (furthest).
5. Turn distance into opening sizeA Graph Mapper shapes the gradient, and Remap Numbers maps it from Diamond Scale Max % next to the curve to Diamond Scale Min % furthest away. Explode, Curve Middle and Curve Closest Point measure the width of a diamond, and an Expression multiplies each value by half that width to get an offset distance.
6. Shrink the diamonds into openingsOffset Curve moves each diamond inward by its distance, using a plane from Evaluate Surface. The space between neighbouring openings becomes the lattice.
7. Add a border and round the cornersA second Offset Curve insets the panel edge by the Border Offset, and Region Intersection keeps only the parts of the openings inside it. Two Expression components turn Fillet Strength into a radius, and Fillet rounds the corners.
8. Make one surface with holesBoundary Surfaces makes one surface from the panel outline with the openings as holes.

Want to learn how to build scripts like this on your own? Check out the Grasshopper Pro course.

On this page

Related tutorial

Free to use, also commercially

Use and change this script in your own projects, personal or commercial.

Please don't re-upload or redistribute the file. If you share it, link to this page so people always get the latest version.

© Hopific

Something not working?

If a script throws an error or doesn't do what this page describes, tell me and I'll fix it.

Tell me →