image thumbnail

Hilbert Curve

version (1.2 KB) by Federico Forte
How to draw the famous Hilbert curve, the curve that fills an area.


Updated 09 Apr 2004

View License

This recursive function calculates coordinates of n-th order Hilbert curve. It is then possible to plot it using the "line" command.

Cite As

Federico Forte (2022). Hilbert Curve (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R10
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!