Hi all,

I have recently found a Grasshopper “sketch” that I would like to port to Processing but I am having difficulties understanding how it was made.

*Artwork by Eftihis Efthimiou*

Asked about the creation process on IG, the author replied

These are a space filling curve that runs on a grid masked by a raster. The masking is breaking the standard Hilbert look. Then I am doing a multiple polyline offset […].

The line offsetting part put aside, this is the allusion to Hilbert curves that is surprising. I do believe that some sort of space filling algorithm has been used but nowhere I can recognize the Hilbert curve pattern.

As you can see, a “standard” Hilbert curve with a 90° angle never intersects itself (no closed squares, rectangles or diagonals) and has a very clear/identifiable pattern. A mask would just hide some part of if (replaced by offsetted lines in the picture) but wouldn’t have any impact on it (no bending, no changes in angle or direction).

- Do you think the author of that sketch really used a Hilbert curve ?
- If so, how would you explain the changes in the pattern ?
- If not, what kind of algorithm would produce that kind of output (a modified maze generation, …) ?

I would be very interested to have your take on this.

EDIT: According to the hashtags under the IG post, the Traveling Salesman algorithm is being used as well. Not sure what to do with this.

Other examples can be found here and here (somewhat NSFW at a distance)