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

Bubbles Along Curve

Attractor curve circle pattern

Circles scattered over a surface that grow larger the closer they are to a curve, forming a band of bubbles across the panel. Draw your own curve in Rhino to steer where the density goes.


Price

Free

Plugins

None, native components only

Works with

Rhino 7 & 8, Mac and Windows

Level

Beginner

Inputs

Reference in Rhino

Surfaceinput Srf

The surface the bubbles are scattered over. It must be a planar (flat) surface.

Reference in Rhino

Curveinput Crv

The line the bubbles gather along. Bubbles are largest on 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 on the curve just touch.0.45
Smallest radiusThe size 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 if the bubbles must not overlap, for example when you laser-cut them as holes.
  • For a perforated panel, bake the circles as cut lines and set the smallest radius to what your fabricator can cut.
  • 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. The groups on the canvas follow the same order.

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 neighbours 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 to 1.
4. Turn distance into bubble sizeA Graph Mapper shapes the gradient and Remap Numbers maps it from the largest size (on the curve) down to the smallest (far away).
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