Peano curve: Difference between revisions
→{{header|Fōrmulæ}}: added Peano-Meander variant by L-system
(Added Algol 68) |
(→{{header|Fōrmulæ}}: added Peano-Meander variant by L-system) |
||
(One intermediate revision by one other user not shown) | |||
Line 175:
{{libheader|ALGOL 68-l-system}}
Generates an SVG file containing the curve using the L-System. Very similar to the Algol 68 Sierpinski square curve sample. Note the Algol 68 L-System library source code is on a separate page on Rosetta Code - follow the above link and then to the Talk page.<syntaxhighlight lang="algol68">
BEGIN # Peano Curve in SVG
# uses the RC Algol 68 L-System library for the L-System evaluation & #
# interpretation #
Line 539 ⟶ 538:
'''Solution'''
===
[[File:Fōrmulæ - Peano curve 01.png]]
'''Test cases'''▼
[[File:Fōrmulæ - Peano curve 02.png]]
Line 549 ⟶ 546:
[[File:Fōrmulæ - Peano curve 03.png]]
▲'''Test cases'''
=== Varian 2, by L-system ===▼
=== Peano-Meander variant, by 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 Peano-Meander curve is:
[[File:Fōrmulæ - L-system - Peano-Meander curve 01.png]]
[[File:Fōrmulæ - L-system - Peano-Meander curve 02.png]]
The program that creates a Switch-back Peano curve is:
[[File:Fōrmulæ - L-system - Peano Curve 01.png]]
|