Fine Sticks Grasshopper pattern: rows of thin vertical sticks with varying density

Fine Sticks

Barcode stick pattern

Rows of thin vertical sticks in three widths, laid out in a random barcode rhythm. The sticks nearest a curve are picked out as a separate group.

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 sticks are built on. It must be a planar (flat) surface.

Curve

The attractor. The sticks closest to it are picked out as a separate group.

Main Sliders

SliderWhat it changesDefault
DivisionsThe number of rows of sticks. More rows means shorter sticks.15
Relative Stick Width 1
Relative Stick Width 2
Relative Stick Width 3
The three stick widths, in thousandths of the surface width (7 means 0.7% of the width).7
8
12
Amount to keep (%)The percentage of all sticks picked out near the curve, starting with the closest. They’re shown in blue; the rest are shown in grey.44
Randomness StrengthHow much the order is shuffled before the sticks are picked. At 0 the border follows the distance to the curve exactly; higher values scatter it.0.48

Also try: change the seed of the Random component to get a different order of stick widths in every row.

Notes

  • No sticks are removed. Every row is filled edge to edge, and the script splits the sticks into two groups, shown in blue and grey with Custom Preview. You can bake either group or both.
  • The last stick in each row is usually cut short. The row is filled with whole sticks until it runs out, so the stick at the end gets whatever space is left.
  • For a coarser or finer barcode, raise or lower the three Relative Stick Width values together. If all three are equal, every stick has the same width and the rhythm becomes regular.

Design Logic

How the script builds the pattern, step by step.

Fine Sticks Grasshopper script on the canvas
The whole script on the Grasshopper canvas. Open full size ↗
StepHow the script does it
1. Split the surface into rowsDivide Surface makes a grid of points. Cull Index drops the last row of points, and Flip Matrix and Nurbs Curve draw a line along the starting edge of each row.
2. Measure the surfaceList Item, Line and Length measure the width and height of the surface. An Expression divides the height by the number of rows to get the stick length.
3. Set three stick widthsThree Expression components turn the Relative Stick Width sliders into lengths, as thousandths of the surface width. Merge puts them in one list.
4. Fill each row with a random sequenceMass Addition and an Expression work out how many times the three widths fit across the surface, and Duplicate Data repeats them that often. Tree Statistics and Random give each row its own seed, Jitter shuffles the widths, and Mass Addition adds them up into positions along the row.
5. Cut and extrude the sticksEvaluate Length finds those positions on each row line and Shatter cuts the line there. Amplitude makes a vector one row high, pointing up the surface, and Extrude turns each piece into a stick.
6. Pick the sticks near your curveCurve Middle and Curve Closest Point measure each stick’s distance to the curve, and Sort List orders the sticks from near to far. Jitter mixes that order a little. List Length, an Expression and Sub List take the share of the list set by Amount to keep (%), and List Item and Cull Index split the sticks into the picked ones and the rest.
7. Colour the two groupsTwo Colour Swatch and Custom Preview pairs show the picked sticks in blue and the rest in grey.

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 →