untitled
Our department asked for an image for a post on this manuscript .
Our department asked for an image for a post on this manuscript .
(github repo is here) I've been playing with retro-styled interfaces terminal lately. The unicode box and block drawing characters are wonderful for this, especially "symbols for legacy computing" . These include characters from classic computers of the twentieth century, and the block-diagonal teletext characters. These can be combined with ANSI escape codes for styled and colored text . Which…
Some days you just need... If you have Python3 installed... pip3 install --user scipy numpy sty copy and save the code below to a file named ./colors chmod +x ./colors optionally move colors to a directory on your $PATH , or add its containing directory to $PATH when you need to clear your mind, run colors . This is designed to work in the terminal, even if you haven't started an X server. It uses…
Here's a python script to plot the price of cryptocurrencies directly on the command line. This a single python script, which depends on the requests , pandas , and numpy packages. It uses the Symbols for Legacy Computing unicode block for plotting directly inside the terminal emulator. Most terminals based on the Gnome terminal support these characters. I make no apologies for the garish color…
In 1986, Silicon Beach Software released World Builder , software for creating adventure games with a text interface and accompanying black-and-white graphics. Four years later, Ray Dunakin released "Ray's Maze", a World Builder-based puzzle game that was both addictive and immersive, despite (or perhaps because of?) the primitive graphics. Ray would go on to release two sequals in the same…
Recall the formula for the inverse of a 2×2 block matrix: $$ \begin{aligned} \begin{bmatrix} A&B\\ C&D \end{bmatrix}^{-1} &= \begin{bmatrix} A^{-1}+A^{-1}BS^{-1}CA^{-1}&-A^{-1}BS^{-1}\\ -S^{-1}CA^{-1}&S^{-1} \end{bmatrix} \\ S &= D - C A^{-1} B \end{aligned} $$ Now consider a 3×3 block matrix $$ \begin{aligned} X &= \begin{bmatrix} E&F&G\\ H&J&K\\ L&M&N \end{bmatrix} \end{aligned} $$ Apply the 2×2…
Procedural rendering routines often need pseudorandom numbers. For graphics rendering, we usually prefer correct-ish and fast code over properly "correct" code. My approach to random number generation is usually to intermittently seed a weak pseudo-random number generator, like a linear-feedback shift register , from a stronger source like Javascript's Math.random(). On the GPU, things are not so…
I've been playing around with cellular automata for procedural generation in WebGL. Here's an algorithm for rendering dendriform growth . I was aiming for rivers, but it came out like neurons. [view in browser] It's built atop a diffusion-limited aggregation cellular automata. Algorithm sketch: Each cell looks at the 4 nearest neighbors on the grid. We also check the 4 corners ("far" neighbors) to…
Implementation of Conway's game of life cellular automata with a retro-style shader. Added as example on webgpgpu Github . [view in browser] [smaller version for mobile] Sketch of WebGL implementation: Underlying cellular automata runs Conway's game of life States as game tiles: new cells: small blue; live cells: blue; died: skulls Life diffuses out coloring nearby areas A single RGBA texture…
Added as example on webgpgpu Github . This is a cellular automata analogue of the model that we used for developmental retinal waves in this paper . [view in browser] Key rules Vegetation "grows" occasionally (flip a coin to increment amount of trees) Fires have a small chance of starting spontaneously Intensity of ignited fires decay down to zero, at which point they leave ash Fires spread to…
Quasicrystals are aperiodic spatial tilings, and 2D quasicrystals have been used for centuries in Islamic art . I find these patterns beautiful , and I think more people should know how to render them. You can render 2D quasicrystals as a sum of plane waves . They can also be constructed using aperiodic tilings (e.g. 4-fold Ammann-Beenker tiles and 5-fold Penrose Tiles ), and there are fractal…
In 1944, the US Office of Strategic Services published an internal document: the " Simple Sabotage Field Manual ". In addition to specific techniques for breaking machines, it included suggestions for how to cripple an organization. All of the suggestions are things that already happen spontaneously, because organizing large numbers of people reliably and safely is hard. Rather than re-state the…
The extension uBlock Origin for Chrome and Firefox allows users to block offensive elements on websites. It works by matching the name of elements on a page against a block list, but some websites randomize element IDs, making this tricky. One can block elements with parts of their ID randomized in uBlock, but it is not automatic. First: Have uBlock Origin installed Identify element to block Right…
I couldn't figure out the name of this to search for it online, and it wasn't mentioned on Wikipedia's marching squares page, so… here's to reinventing wheels ( : Sebastian Blomfield's "Lord of the Manor" game inspired me to explore retro-game engine coding. So far, I've got a basic tile-shader that renders tiled 2D game environments (e.g. game of life , forest fire simulation ). Next up: what if…
LED multiplexing layouts for hand-crafting outlined LED grid layouts using a diagonal section of a Charlieplexed grid of LEDs. This post presents some additional layouts designed for e-textiles (e.g. embroidery, bead-weaving). The main idea of these layouts is that they should consist of a regular, repeating lattice of N driving lines, such that each pair of lines cross exactly twice. One LED is…
Previous posts illustrated hardware building Charlieplexed displays ( 1 2 3 4 ). However, building the display hardware is only half the work: one also needs a display driver. This post covers strategies for writing firmware to drive Charlieplexed LED displays. I'll be working with the Arduino Uno , which uses the AtMega328 microcontroller . These strategies are general, but the hardware-specific…