Sierpinski triangle/Graphical: Difference between revisions
Content added Content deleted
(added autohotkey) |
(Updated D entry) |
||
Line 373:
The output image is the same as the Go version. This requires the module from the Grayscale image Task.
{{trans|Go}}
<lang d>
import grayscale_image;
enum order = 8,
margin = 10,
Line 383:
im.clear(Gray.white);
foreach (immutable y; 0 .. width)
foreach (immutable x; 0 .. width)
if ((x & y) == 0)
im[x + margin, y + margin] = Gray.black;
|