Nested Waves Grasshopper pattern: overlapping diagonal sine waves

Nested Waves

Woven sine wave pattern

Diagonal waves laid side by side and out of step, so the crests of each wave nest into the gaps of the next without overlapping.

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 waves are drawn on. It must be a planar (flat) surface. Any outline works, since the waves are trimmed to its edge.

Main Sliders

SliderWhat it changesDefault
Effect RotationThe angle of the waves across the surface, in degrees, measured from the surface’s U direction. At 45 they run diagonally.45
Wave Spacing as % of Edge LengthThe gap between neighbouring waves, as a percentage of one side of the rectangle around your surface. Lower values give more, closer waves.4
Wave FrequencyThe number of segments each wave line is divided into. Every second point is lifted, so you get about half as many crests.12
Wave Height (Up to Neighbor)How high the crests rise toward the next line, as a share of the gap. At 1 they reach it.0.6
Curve Bulge ControlHow full and rounded the curve is between the points.0.25
Offset Width as % of Neighboring LinesThe width of each wave, as a percentage of the gap between lines.27

Also try: bypass the Shift List, so every line rises at the same points. The waves then run in parallel instead of nesting into each other.

Notes

  • Neighbouring waves are out of step. Each line rises where the lines next to it stay low, so the crests of one wave reach into the gaps of the next without overlapping it.
  • Watch Wave Height (Up to Neighbor) and Offset Width as % of Neighboring Lines together. With high values for both, the crests run into the next wave and the strips merge.
  • Every line has the same number of crests. The lines are drawn across a rectangle that encloses your surface and only trimmed at the end, so the waves stay lined up even on an irregular outline.

Design Logic

How the script builds the pattern, step by step.

Nested Waves Grasshopper script on the canvas
The whole script on the Grasshopper canvas. Open full size ↗
StepHow the script does it
1. Set the direction of the wavesEvaluate Surface gives a plane in the middle of the surface. Line SDL draws its normal, and Rotate Axis turns the plane around it by Effect Rotation.
2. Draw a rectangle around the surfaceBounding Box fits a box around the surface, aligned with the rotated plane. Deconstruct Brep, Area, Sort List and List Item pick its largest face: a rectangle that covers the whole surface.
3. Draw parallel base linesDeconstruct Brep, List Item and Length measure one side of the rectangle, and an Expression turns Wave Spacing as % of Edge Length into a distance. Contour cuts the rectangle into evenly spaced lines.
4. Decide which points riseDivide Curve splits each line into Wave Frequency segments. Multiplication turns Wave Height (Up to Neighbor) into a distance, and Merge, List Length and Duplicate Data build an alternating list: no lift, lift, no lift, lift…
5. Put neighbouring lines out of stepTree Statistics, Dispatch and Tree Branch pick every second line, and Shift List moves its list by one. Sub List trims each list to the number of points.
6. Lift the pointsLine SDL draws a line from each point toward the next base line, as long as its lift, and End Points takes its end. Sort Along Curve keeps the points in order along the line.
7. Draw smooth wavesTangent Curve draws a curve through the points, with every tangent parallel to the base lines (from Duplicate Data), so the crests and troughs come out smooth. Curve Bulge Control sets how full it is.
8. Give the waves width and trim themEnd Points and Distance measure the gap between two base lines, and an Expression takes Offset Width as % of Neighboring Lines as a share of it. Two Offset Curve components, End Points, Line and Join Curves make a closed strip that becomes a flat surface. Surface Split, Area, Point In Curve and Cull Pattern keep only the parts inside your surface.

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 →