Sierpinski arrowhead curve: Difference between revisions
m
→{{header|ALGOL 68}}: comments
m (→{{header|ALGOL 68}}: remove small amount of unneeded code) |
m (→{{header|ALGOL 68}}: comments) |
||
(One intermediate revision by one other user not shown) | |||
Line 125:
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 # Sierpinski Arrowhead Curve in SVG
# uses the RC Algol 68 L-System library for the L-System evaluation & #
# interpretation #
Line 939 ⟶ 938:
Windowtitle "Hit any key to end program"
Sleep</syntaxhighlight>
=={{header|Fōrmulæ}}==
{{FormulaeEntry|page=https://formulae.org/?script=examples/L-system}}
'''Solution'''
It can be done using an [[wp:L-system|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 Sierpiński arrowhead is:
[[File:Fōrmulæ - L-system - Sierpiński triangle (rounded) 01.png]]
[[File:Fōrmulæ - L-system - Sierpiński triangle (rounded) 02.png]]
=={{header|Go}}==
|