Bubbles Along Curve Grasshopper pattern: circles growing larger along a diagonal curve

Bubbles Along Curve

Attractor curve circle pattern

Scattered dots that grow larger the closer they are to a curve, forming a band of bubbles along it.

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 bubbles are scattered over. It must be a planar (flat) surface.

Curve

The line the bubbles gather along. Bubbles are largest next to the curve and shrink away from it.

Main Sliders

SliderWhat it changesDefault
Number of pointsHow many bubbles are scattered over the surface. More points means smaller, denser bubbles.1000
Bubble ScaleThe size of the largest bubbles, as a share of the spacing between points. Around 0.5, bubbles next to the curve just touch.0.45
Smallest radiusThe radius of the bubbles furthest from the curve.0.01

Also try: reshape the Graph Mapper to change how quickly the bubbles shrink, or change the seed of Populate 2D for a different random arrangement.

Notes

  • Keep Bubble Scale at 0.5 or below to avoid most overlaps. The spacing is an average, so a few points that sit closer together than usual can still overlap near the curve.
  • The full range is always used. The point nearest the curve always gets the largest bubble and the furthest point the smallest, wherever you draw the curve.
  • To gather the bubbles around a point instead of a line, replace Curve Closest Point with Distance to that point.

Design Logic

How the script builds the pattern, step by step.

Bubbles Along Curve Grasshopper script on the canvas
The whole script on the Grasshopper canvas. Open full size ↗
StepHow the script does it
1. Scatter points over the surfacePopulate 2D spreads points evenly but randomly across the surface. Each point becomes the centre of a bubble.
2. Work out the largest bubble sizeClosest Points finds each point’s nearest neighbour and Average gives the typical spacing. Multiplication scales it by Bubble Scale, so the biggest bubbles fit between their neighbours.
3. Measure each point’s distance to your curveCurve Closest Point measures the distance. Bounds and Remap Numbers turn the distances into values from 0 (nearest) to 1 (furthest).
4. Turn distance into bubble sizeA Graph Mapper shapes the gradient. Construct Domain makes a range from the largest size down to the smallest radius, and a second Remap Numbers maps the values into it.
5. Draw the bubblesCircle CNR draws a circle at each point, facing the surface’s normal from Evaluate Surface, with the radius from step 4.

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

On this page

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 →