help-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: awk and graphics


From: Manuel Collado
Subject: Re: awk and graphics
Date: Sun, 5 Nov 2023 15:59:03 +0100
User-agent: Mozilla Thunderbird

El 5/11/23 a las 10:10, Miriam English escribió:
Does anybody know some simple, fast, screen display extension that awk
can use?

I've been fiddling around with some of my old cellular automata
programs and have translated them to a few languages, including awk. I
haven't found any way to output graphics to the screen directly from
awk, so I've made it write to a .pbm image file. The great advantage of
this is that pbm is an ascii format, and easy to write to from awk.
(I've attached a pbm file of a cellular automaton, and another converted
to png in case you can't view pbm. It is an old format.)
[...]

Anybody know of something I can use?

There are a lot of other textual source code for graphics, in addition to .pbm. But it seems you want direct generation of images in the screen instead of creating graphic files for later inspection.

Perhaps a possible approach could be to pipe awk output to some interpreter that draws the image on screen. For instance, you can pipe awk output to a Tcl/Tk intepreter (tclsh/wish), and send commands for creating and draw elements in a canvas widget.

This way the screen image could be modified on the fly, I think.

HTH.
--
Manuel Collado - http://mcollado.z15.es



reply via email to

[Prev in Thread] Current Thread [Next in Thread]