Ridge Lines Grasshopper pattern: horizontal lines kinking along a curve

Ridge Lines

Line pattern deformed by curves

Horizontal lines that kink into angled segments along a curve, raising a ridge across the panel.

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

Curve

The curve that raises the ridge. Near it, the lines turn to follow its direction and get thicker. It must lie in the same plane as the surface.

Main Sliders

SliderWhat it changesDefault
Columns
Rows
The number of cells across and along the surface. There is one dash per cell, so Rows sets the number of lines and Columns the number of dashes in each line.25
30
Max. Rectangle Width
Min. Rectangle Width
The thickness of the lines nearest to and furthest from the curve, relative to the size of your surface.15
3
Rotation Near
Rotation Far
How far the dashes turn toward the curve’s direction, nearest to it and furthest from it. At 1 a dash follows the curve; at 0 it stays straight.1
0

Also try: reshape the two Graph Mapper components to make the ridge wider or narrower, and to change how quickly the lines thicken toward the curve.

Notes

  • Draw the curve in the plane of the surface. The script measures distances and directions in that plane; a curve above or below it gives odd results.
  • The lines are made of dashes, one per cell. Far from the curve the dashes meet end to end and read as continuous lines. Near it they turn and break into angled segments, which is what raises the ridge.
  • Set Rotation Far to 1 as well to make every dash follow the curve’s direction, so the whole surface echoes its shape.

Design Logic

How the script builds the pattern, step by step.

Ridge Lines 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 cellsDivide Domain² and Isotrim cut the surface into a grid of small rectangles, and Area finds the centre of each.
2. Measure the surfaceExplode breaks the surface outline into its sides, and List Item and Length measure two of them. One length divided by Columns gives the dash length; the other is the base for the line thickness.
3. Draw a straight dash and a curve-following dashLine SDL draws a dash from each cell centre, parallel to the side of the surface. Curve Closest Point and Evaluate Curve find the curve’s direction at the nearest point, and a second Line SDL draws a dash in that direction. Evaluate Curve, Line and Move bring it to the cell centre.
4. Turn the dashes near the curveBounds and Remap Numbers turn each cell’s distance to the curve into a value from 0 to 1. A Graph Mapper shapes it and Remap Numbers maps it between Rotation Near and Rotation Far. Tween Curve blends between the straight dash and the curve-following dash by that amount.
5. Thicken the dashes near the curveTwo Expression components scale Max. Rectangle Width and Min. Rectangle Width to the size of the surface. The same distances go through a second Graph Mapper, and Remap Numbers maps them from Max. Rectangle Width (near) to Min. Rectangle Width (far).
6. Turn the dashes into rectanglesOffset Curve copies each dash to both sides by half its width. End Points, Line and Join Curves close the copies into a rectangle, and a Surface parameter turns it into a flat piece.

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 →