Sierpinski triangle/Graphical: Difference between revisions

Content added Content deleted
Line 1,405: Line 1,405:
'''Solution'''
'''Solution'''


=== By L-system ===
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]].


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 triangle is:

The script that creates a Sierpiński triangle is:


[[File:Fōrmulæ - L-system - Sierpiński triangle 01.png]]
[[File:Fōrmulæ - L-system - Sierpiński triangle 01.png]]


[[File:Fōrmulæ - L-system - Sierpiński triangle 02.png]]
[[File:Fōrmulæ - L-system - Sierpiński triangle 02.png]]

=== By chaos game ===

There is a function written in Fōrmulæ to create Sierpiński n-gons by the method known as chaos game in the page [[Chaos game#Fōrmulæ | chaos game]].

The script that creates a Sierpiński triangle is:

[[File:Fōrmulæ - Chaos game - Sierpiński triangle 01.png]]

[[File:Fōrmulæ - Chaos game - Sierpiński triangle 02.png]]

=== By Kronecker product based fractal ===

There is a function written in Fōrmulæ to create generic Kronecker product based fractal in the page [[Kronecker product based fractals#Fōrmulæ | Kronecker product based fractals]].

The script that creates a Sierpiński triangle is:

[[File:Fōrmulæ - Kronecker product based fractals 08.png]]

[[File:Fōrmulæ - Kronecker product based fractals 09.png]]

=== By elementary cellular automaton ===

There is a function written in Fōrmulæ to create images for the elementary cellular automaton in the page [[Elementary cellular automaton#Fōrmulæ | Elementary cellular automaton]].

All the rules 18, 22 , 23, 60, 82, 90, 102, 126, 129, 146, 153, 154, 161, 165, 167, 181, 182, 195, 210 and 218 produce Sierpiński triangles:

[[File:Fōrmulæ - Elementary cellular automaton - Sierpiński triangle 01.png]]

[[File:Fōrmulæ - Elementary cellular automaton - Sierpiński triangle 02.png]]


=={{header|gnuplot}}==
=={{header|gnuplot}}==