Munching squares: Difference between revisions
Content added Content deleted
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
=={{header|Mathematica}}== |
=={{header|Mathematica}}== |
||
⚫ | |||
Output #1: |
|||
<lang Mathematica> |
<lang Mathematica> |
||
ListDensityPlot[ |
ListDensityPlot[ |
||
Line 8: | Line 10: | ||
2], {x, 0, 255}], {y, 0, 255}]] |
2], {x, 0, 255}], {y, 0, 255}]] |
||
</lang> |
</lang> |
||
output: |
|||
⚫ | |||
⚫ | |||
Output #2: |
|||
<lang Mathematica> |
<lang Mathematica> |
||
ArrayPlot[Array[BitXor, {511, 511}]] |
ArrayPlot[Array[BitXor, {511, 511}]] |
||
</lang> |
</lang> |
||
output: |
|||
⚫ |
Revision as of 08:58, 28 November 2011
Munching squares
You are encouraged to solve this task according to the task description, using any language you may know.
You are encouraged to solve this task according to the task description, using any language you may know.
Mathematica
Output #1: <lang Mathematica> ListDensityPlot[
Table[Table[ FromDigits[BitXor[IntegerDigits[x, 2, 8], IntegerDigits[y, 2, 8]], 2], {x, 0, 255}], {y, 0, 255}]]
</lang>
Output #2: <lang Mathematica> ArrayPlot[Array[BitXor, {511, 511}]] </lang>