Anonymous user
Munching squares: Difference between revisions
m
→{{header|REXX}}: added/changed whitespace and comments.
m (→{{header|REXX}}: added/changed whitespace and comments.) |
|||
Line 1,208:
<lang rexx>/*REXX program renders a graphical pattern by coloring each pixel with x XOR y */
/*───────────────────────────────────────── from an arbitrary constructed color table. */
rows=
cols=
x2b( d2x($+1, 2) ) ||,
x2b( d2x($+2, 2) )
end /*row*/▼
do
do
@.x.y= bitxor(@.x, @.y) /*renders
end /*y*/▼
▲ @.row.col= x2b( d2x($+0, 2) ) ||, /*ensure $ is converted──►2 hex nibbles*/
end /*x*/
▲ x2b( d2x($+2, 2) )
▲ end /*col*/ /* [↑] construct a three-byte pixel. */
▲ end /*row*/
▲ do x=0 for cols /*create a graphical pattern with XORs.*/
▲ do y=0 for rows
▲ end /*y*/
Must be converted to an image with a separate program. <br><br>
|