Pearl Chains Grasshopper pattern: dots on vertical lines growing larger along a curve

Pearl Chains

Attractor dot pattern

Dots strung along vertical lines like pearls, growing larger along a curve.

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 chains are built on. The chains run in its V direction. It must be a planar (flat) surface.

Curve

The attractor. On every chain, the pearls closest to this curve are the largest. A diagonal across the surface works well.

Main Sliders

SliderWhat it changesDefault
DivisionsThe number of chains across the surface. You get one more chain than the slider value, with a chain on each edge.27
Min Spacing %
Max Spacing %
The range for the pearl spacing along each chain, as a percentage of the gap between chains. Every chain picks its own random value in this range.68
100
Size at CurveThe size of the largest pearl on each chain, as a share of that chain’s pearl spacing. At 1 the pearls nearest the curve just touch their neighbours.1
Effect Fall-Off ControlHow quickly the pearls shrink away from the curve. At 0 they shrink to nothing at the far end of each chain. Lower values make them disappear sooner, at a point that varies from chain to chain.-0.48

Also try: change the seed (S) of the two Random components to get a different mix of pearl spacings and fall-offs from chain to chain.

Notes

  • Every chain has its own biggest pearl. The sizes are worked out chain by chain, so each chain gets a full-size pearl at its point nearest the curve, however far the chain is from it. The curve decides where along each chain the big pearls sit.
  • Keep Max Spacing % below 100 and Size at Curve below 1 if the pearls must not touch. At the defaults, the largest pearls can meet the pearls next to them.
  • The result is a set of flat discs. The circles are turned into surfaces, which makes the size gradient easier to see.

Design Logic

How the script builds the pattern, step by step.

Pearl Chains Grasshopper script on the canvas
The whole script on the Grasshopper canvas. Open full size ↗
StepHow the script does it
1. Draw the chain linesDivide Surface makes a grid of points with one division in V. Nurbs Curve joins each pair of points into a straight line from one edge to the other. Each line becomes a chain.
2. Measure the gap between chainsFlip Matrix regroups the points, List Item picks two neighbouring points and Distance measures the gap between them.
3. Give each chain its own pearl spacingAn Expression turns Min Spacing % and Max Spacing % into lengths, and Construct Domain makes a range from them. Random picks one value per chain (Tree Statistics counts the chains), and Divide Length places points along each chain at that spacing.
4. Get a plane at every pearlSurface Closest Point and Evaluate Surface give a plane on the surface at each point, so the pearls lie flat on it.
5. Turn distance to your curve into a size factorCurve Closest Point measures each point’s distance to the curve. Bounds and Remap Numbers map the distances on each chain from Size at Curve (nearest) down to a random end value between Effect Fall-Off Control and 0 (furthest), picked per chain by a second Random. Maximum stops the values going below 0.
6. Draw the pearlsMultiplication multiplies each chain’s spacing by the size factor to get the pearl diameter, and Circle draws the pearl with half of it as the radius. Clean Tree removes the pearls that shrank to nothing, and a Surface parameter turns the circles into flat discs.

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 →