Hilbert Curve

How to draw the famous Hilbert curve, the curve that fills an area.
7K Downloads
Updated 9 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 (2024). Hilbert Curve (https://www.mathworks.com/matlabcentral/fileexchange/4646-hilbert-curve), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R10
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Fractals in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0

Modified "Peano curve" in more correct "Hilbert curve".