diff options
Diffstat (limited to '_site/log/matrix-digital-rain/index.html')
| -rw-r--r-- | _site/log/matrix-digital-rain/index.html | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/_site/log/matrix-digital-rain/index.html b/_site/log/matrix-digital-rain/index.html index 16b96be..659922d 100644 --- a/_site/log/matrix-digital-rain/index.html +++ b/_site/log/matrix-digital-rain/index.html @@ -51,10 +51,10 @@ stored in a dedicated array–still don’t understand why I did that when I had already used bit-packing for the RGB channels; The algorithm was difficult to decipher. The 2022 version worked, but that’s not the same thing as correct.</p> -<p>I began by placing the decay factor in the LSB of the 4-byte RGB value. Let’s -call that RGB-PD. PD plays a somewhat analogous role to an alpha channel in -that both influence transparency. However, they work very differently. So, I -avoided labelling it A so as not to cause confusion:</p> +<p>I began by placing the decay factor in the LSB of the 4-byte RGB value. The PD +value plays a somewhat analogous role to an alpha channel in that both +influence transparency. However, they work very differently. So, I avoided +labelling it A so as not to cause confusion:</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>enum { R, /* Red */ @@ -129,8 +129,7 @@ static inline void insert_code(matrix *mat, first codepoint and the high four bytes the last. Here, I chose bitwise operations over unions because, first and foremost, the operations themselves are trivial and idiomatic, and the UNICODE() macro simplifies the management of -charsets. The insert_code() function is now ready to take its rightful place -next to blend().</p> +charsets.</p> <p>The init_term() function is the arbiter of this zero-dependency software. It prepares the graphical environment so that I can interact with it via ANSI @@ -158,8 +157,6 @@ escape codes instead of unnecessary layers of abstraction:</p> } </code></pre></div></div> -<p>All credit for the terminal control function belongs to Domsson, whose <a href="https://github.com/domsson/fakesteak" class="external" target="_blank" rel="noopener noreferrer">Fakesteak</a> inspired my own three years ago.</p> - <p>insert_code() seeds the Matrix, blend() creates the old monochrome CRT display nostalgia, and ANSI control sequences paint the screen. The result is a digital rain that captures the original Matrix aesthetic with high visual fidelity:</p> |
