Grasshopper

algorithmic modeling for Rhino

Here a small script that allow to compute the position on an Hilbert Curve of order "n" (in my script between 1 and 10, but could be extended/removed) with a distance "d" from the beginning of the curve normalized. The beginning of the curve is d=0 and end d=1. 

It ouputs the x and y on Hilbert curve. So if you input "4^order distances from 0 to 1, you will have the corners of the curve, so if you plug a Polyline component you will get the Hilbert Curve of Order "n". 

The source is from here

https://en.wikipedia.org/wiki/Hilbert_curve

The idea came after seeing 3Blue1Brown: 

https://www.youtube.com/watch?v=DuiryHHTrjU&t=2s

The cool thing is that if you plug a random component, it will output random points in 2d. But less quality that populate 2D.

Views: 3399

Attachments:

Replies to This Discussion

You also could have a sort of curve signature of image brightness. The global shape is independant of the resolution. Here the same image with different orders of Hilbert Curve

Very interesting Laurent. Would it be possible to constrain the growth of the hilbert curve inside of a boundary region or boundary curve? This would make a great surface texture.

Generally speeking, I don't know. If surface could be parametrized in UV, yes. For surface you could use Daniel Piker growing curve.

https://vimeo.com/131467307

http://www.grasshopper3d.com/forum/topics/differential-growth-in-cu...

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service