Sierpinski triangle: Difference between revisions
Content deleted Content added
→{{header|PostScript}}: cleaner implementation |
→{{header|PostScript}}: missing header |
||
Line 1,168: | Line 1,168: | ||
=={{header|PostScript}}== |
=={{header|PostScript}}== |
||
This draws the triangles in a string-rewrite fashion, where all edges form a single polyline. 9 page document showing progession. |
This draws the triangles in a string-rewrite fashion, where all edges form a single polyline. 9 page document showing progession. |
||
<lang postscript> |
<lang postscript>%!PS-Adobe-3.0 |
||
%%BoundingBox 0 0 300 300 |
|||
/F { 1 0 rlineto } def |
|||
/+ { 120 rotate } def |
/+ { 120 rotate } def |
||
/- {-120 rotate } def |
/- {-120 rotate } def |