miriam_e: from my drawing MoonGirl (Default)
[personal profile] miriam_e
With enormous help from KimiAI, I have been working on producing a graphics server that acts as a graphics screen for programs and computer languages that can't do graphics themselves, like, for example, awk. I can write images, and even animations (though primitive so far) by using the text output from awk (or any computer langauage) to draw on a canvas.

Previously (back in November 2023) I wrote here about my attempts to give awk graphical output by writing directly to an ASCII .pbm file. It works, but is a bit clunky and inconvenient. At the time I compared the speed of various ways to draw a 256x192 pixel image of Wolfram's 1D cellular automaton (rule 30).

1 hr 8 minutes -- the old CoCo computer
5 minutes -- the CoCo emulator running as fast as my computer allowed
12 minutes -- using python
0.08 second -- awk creating a .pbm image file
and now...
0.633 second -- awk drawing onto a canvas through my graphics server.
That's slower than awk writing to a .pbm image file, but much more satisfying, as I can watch the image being drawn. This lets me catch errors early or enjoy animation. And it is far quicker and simpler than python graphics... and python can write to the canvas through the server too. In fact any program with text output can, even the bash shell!

And just to show off the amazing capabilities of this graphics server, here is a Mandelbrot set drawn by a short awk program sending its text output to the canvas server. The 800x800 pixel image took just 10 seconds to calculate:


I have just a few more improvements to this graphics server and I'll upload it to my website for anybody to use.

Profile

miriam_e: from my drawing MoonGirl (Default)
miriam_e

February 2026

S M T W T F S
123 4 567
8910 11121314
15161718192021
22232425262728

Style Credit

Expand Cut Tags

No cut tags
Page generated Tuesday, 17 February 2026 11:04 am
Powered by Dreamwidth Studios