From abf2ae336b780ac206e3f5d55b608703c9d807d5 Mon Sep 17 00:00:00 2001 From: Sadeep Madurange Date: Wed, 24 Dec 2025 18:23:30 +0800 Subject: Matrix --- _site/feed.xml | 2 +- _site/log/matrix-digital-rain/index.html | 13 +++++-------- _site/posts.xml | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) (limited to '_site') diff --git a/_site/feed.xml b/_site/feed.xml index 8244681..65fbaa8 100644 --- a/_site/feed.xml +++ b/_site/feed.xml @@ -1 +1 @@ -Jekyll2025-12-24T18:02:31+08:00/feed.xmlASCIIMX | LogW. D. Sadeep MadurangeRecreating the Matrix rain with ANSI escape sequences2025-12-21T00:00:00+08:002025-12-21T00:00:00+08:00/log/matrix-digital-rainW. D. Sadeep MadurangeHow to manage Suckless software installations2025-11-30T00:00:00+08:002025-11-30T00:00:00+08:00/log/suckless-softwareW. D. Sadeep MadurangeFingerprint door lock2025-08-18T00:00:00+08:002025-08-18T00:00:00+08:00/log/fpm-door-lockW. D. Sadeep MadurangeOn the use of MOSFETs as electronic switches2025-06-22T00:00:00+08:002025-06-22T00:00:00+08:00/log/mosfet-switchesW. D. Sadeep MadurangeHow to configure ATmega328P microcontrollers to run at 3.3V and 5V2025-06-10T00:00:00+08:002025-06-10T00:00:00+08:00/log/arduino-unoW. D. Sadeep MadurangeMy first PCB2025-04-26T00:00:00+08:002025-04-26T00:00:00+08:00/log/my-first-pcbW. D. Sadeep MadurangeBumblebee: browser automation2025-04-02T00:00:00+08:002025-04-02T00:00:00+08:00/log/bumblebeeW. D. Sadeep MadurangeHow to set up ATSAM3X8E microcontrollers for bare-metal programming in C2024-09-16T00:00:00+08:002024-09-16T00:00:00+08:00/log/arduino-dueW. D. Sadeep MadurangeEtlas: e-paper dashboard2024-09-05T00:00:00+08:002024-09-05T00:00:00+08:00/log/etlasW. D. Sadeep MadurangeExperimental e-reader2023-10-24T00:00:00+08:002023-10-24T00:00:00+08:00/log/e-readerW. D. Sadeep Madurange \ No newline at end of file +Jekyll2025-12-24T18:23:24+08:00/feed.xmlASCIIMX | LogW. D. Sadeep MadurangeRecreating the Matrix rain with ANSI escape sequences2025-12-21T00:00:00+08:002025-12-21T00:00:00+08:00/log/matrix-digital-rainW. D. Sadeep MadurangeHow to manage Suckless software installations2025-11-30T00:00:00+08:002025-11-30T00:00:00+08:00/log/suckless-softwareW. D. Sadeep MadurangeFingerprint door lock2025-08-18T00:00:00+08:002025-08-18T00:00:00+08:00/log/fpm-door-lockW. D. Sadeep MadurangeOn the use of MOSFETs as electronic switches2025-06-22T00:00:00+08:002025-06-22T00:00:00+08:00/log/mosfet-switchesW. D. Sadeep MadurangeHow to configure ATmega328P microcontrollers to run at 3.3V and 5V2025-06-10T00:00:00+08:002025-06-10T00:00:00+08:00/log/arduino-unoW. D. Sadeep MadurangeMy first PCB2025-04-26T00:00:00+08:002025-04-26T00:00:00+08:00/log/my-first-pcbW. D. Sadeep MadurangeBumblebee: browser automation2025-04-02T00:00:00+08:002025-04-02T00:00:00+08:00/log/bumblebeeW. D. Sadeep MadurangeHow to set up ATSAM3X8E microcontrollers for bare-metal programming in C2024-09-16T00:00:00+08:002024-09-16T00:00:00+08:00/log/arduino-dueW. D. Sadeep MadurangeEtlas: e-paper dashboard2024-09-05T00:00:00+08:002024-09-05T00:00:00+08:00/log/etlasW. D. Sadeep MadurangeExperimental e-reader2023-10-24T00:00:00+08:002023-10-24T00:00:00+08:00/log/e-readerW. D. Sadeep Madurange \ No newline at end of file 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.

-

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:

+

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:

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().

+charsets.

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:

}
-

All credit for the terminal control function belongs to Domsson, whose Fakesteak inspired my own three years ago.

-

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:

diff --git a/_site/posts.xml b/_site/posts.xml index 7e82b61..76d9592 100644 --- a/_site/posts.xml +++ b/_site/posts.xml @@ -1 +1 @@ -Jekyll2025-12-24T18:02:31+08:00/posts.xmlASCIIMXW. D. Sadeep Madurange \ No newline at end of file +Jekyll2025-12-24T18:23:24+08:00/posts.xmlASCIIMXW. D. Sadeep Madurange \ No newline at end of file -- cgit v1.2.3