How to resolve the algorithm Munching squares step by step in the BQN programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Munching squares step by step in the BQN programming language
Table of Contents
Problem Statement
Render a graphical pattern where each pixel is colored by the value of 'x xor y' from an arbitrary color table.
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Munching squares step by step in the BQN programming language
Source code in the bqn programming language
nl←@+10
XORppm ← {
g←⥊(0∾∾˜)¨((↕𝕩)16‿16•bit._xor⊢)˘↕𝕩
s←•Repr 𝕩
h←"P3"∾nl∾s∾" "∾s∾nl∾(•Repr 𝕩-1)∾nl
h∾∾∾⟜nl¨{¯1↓∾∾⟜' '¨•Repr¨𝕩}¨g
}
"xor.ppm" •FChars XORppm 256
You may also check:How to resolve the algorithm Terminal control/Coloured text step by step in the XPL0 programming language
You may also check:How to resolve the algorithm Roots of a function step by step in the ATS programming language
You may also check:How to resolve the algorithm Stack step by step in the Nemerle programming language
You may also check:How to resolve the algorithm Combinations step by step in the Swift programming language
You may also check:How to resolve the algorithm Copy stdin to stdout step by step in the Mercury programming language