Hilbert curve: Difference between revisions

Added Quackery.
m (Updated description and link for Fōrmulæ solution)
(Added Quackery.)
Line 2,675:
Call Hilbert(iX + (1 - q) * iL, iY + q * iL, iL, 1 - p, q)
End Sub</lang>
 
=={{header|Quackery}}==
 
Using an L-system.
 
<lang Quackery> [ $ "turtleduck.qky" loadfile ] now!
[ stack ] is switch.arg ( --> [ )
[ switch.arg put ] is switch ( x --> )
[ switch.arg release ] is otherwise ( --> )
[ switch.arg share
!= iff ]else[ done
otherwise ]'[ do ]done[ ] is case ( x --> )
[ $ "" swap witheach
[ nested quackery join ] ] is expand ( $ --> $ )
[ $ "F" ] is F ( $ --> $ )
[ $ "L" ] is L ( $ --> $ )
[ $ "R" ] is R ( $ --> $ )
[ $ "LBFRAFARFBL" ] is A ( $ --> $ )
[ $ "RAFLBFBLFAR" ] is B ( $ --> $ )
$ "A"
5 times expand
turtle
witheach
[ switch
[ char F case [ 10 1 walk ]
char L case [ -1 4 turn ]
char R case [ 1 4 turn ]
otherwise ( ignore ) ] ] </lang>
 
=={{header|Racket}}==
1,462

edits