Hilbert curve: Difference between revisions

Content added Content deleted
m (Correct link to 4tH, capitalize hilberts in comments.)
(→‎{{header|Fōrmulæ}}: Added L-system solution)
Line 1,468: Line 1,468:


'''Solution'''
'''Solution'''

=== Recursive ===


The following defines a function that creates a graphics of the Hilbert curve of a given order and size:
The following defines a function that creates a graphics of the Hilbert curve of a given order and size:
Line 1,480: Line 1,482:


[[File:Fōrmulæ - Hilbert curve 03.png|279px]]
[[File:Fōrmulæ - Hilbert curve 03.png|279px]]

=== L-system ===

There are generic functions written in Fōrmulæ to compute an L-system in the page [[L-system#Fōrmulæ | L-system]].

The program that creates a Hilbert curve is:

[[File:Fōrmulæ - L-system - Hilbert curve 01.png]]

[[File:Fōrmulæ - L-system - Hilbert curve 02.png]]


=={{header|Frink}}==
=={{header|Frink}}==