Sierpinski triangle/Graphical: Difference between revisions

m
m (→‎{{header|Python}}: formatting - split program to make room for output-picture)
Line 478:
 
=={{header|Icon}} and {{header|Unicon}}==
The following code is adapted from a program by Ralph Griswold that demonstrates an interesting way to draw the Sierpinski Triangle. Given an argument of the order it will calculate the canvas size needed with margin. It will not stop you from asking for a triangle larger than you display. For an explanation, see "Chaos and Fractals", Heinz-Otto Peitgen, Harmut Jurgens, and Dietmar Saupe, Springer-VerlahVerlag, 1992, pp. 132-134.
 
[[File:Sierpinski_Triangle_Unicon.PNG|thumb|Sample Output for order=8]]
Anonymous user