Sierpinski triangle/Graphical: Difference between revisions

m
m (→‎{{header|Sidef}}: modified the code to work with the latest version of Sidef)
m (→‎{{header|zkl}}: added image)
Line 1,406:
 
=={{header|zkl}}==
[[File:SierpinskiTriangle.zkl.jpg|150px|thumb|right]]
Uses the PPM class from http://rosettacode.org/wiki/Bitmap/Bresenham%27s_line_algorithm#zkl
{{trans|XPL0}}
Line 1,411 ⟶ 1,412:
img:=PPM(300,300);
foreach y,x in (Size,Size){ if(x.bitAnd(y)==0) img[x,y]=0xff0000 }
img.write(File("foosierpinskiTriangle.ppm","wb"));</lang>
 
{{out}}
Same as the BBC BASIC image but with red and another order of triangles.
http://www.zenkinetic.com/Images/RosettaCode/sierpinskiTriangle.jpg
 
{{omit from|ACL2}}
Anonymous user