Space-filling Curves in p5.js.

Simon prepared this project as a community contribution for The Coding Train (Simon came up with his own way to draw the Hilbert Curve and added interactive elements to enable the user to create other colourful space-filling curves (Hilbert Curve, Z-order Curve, Peano Curve and more!). You can see Daniel Shiffman’s Hilbert Curve tutorial and coding challenge on The Coding Train’s website (including a link to Simon’s contribution) via this link: https://thecodingtrain.com/CodingInTheCabana/003-hilbert-curve.html

Interactive full-screen version, allowing you to change the seed and the grid size: https://editor.p5js.org/simontiger/full/2CrT12N4

Code: https://editor.p5js.org/simontiger/sketches/2CrT12N4

Screen shot of The Coding Train website with a link to Simon’s contribution

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s