Generative art
The arxiv is there.
Shading in pen plotting
Here's an example:
Without shading
With shading
Different shading algorithms
Random walk on the image
Uniform additive noise
Uniform multiplicative noise
Some notes on bitwise art
-- bitxor (X, Y) Return the bitwise XOR of non-negative integers X and Y. -- bitand (X, Y) Return the bitwise AND of non-negative integers. X, Y must be in the range [0,intmax] -- bitor (X, Y) Return the bitwise OR of non-negative integers X and Y. -- bitcmp (A, K) Return the K-bit complement of integers in A. If K is omitted 'k = log2 (flintmax) + 1' is assumed. -- bitshift (A, K) -- bitshift (A, K, N) Return a K bit shift of N-digit unsigned integers in A. A positive K leads to a left shift; A negative value to a right shift. If N is omitted it defaults to 64. N must be in the range [1,64].
Pen plotter path optimization
Here's two plots of the "same drawing": optimized, using a greedy algorithm, and a non-optimized version. Screenshots are from Inkcut software (there's also a plugin for Inkscape).
The final plot.
Facade - Lisboa. (BIC ballpoint pen on paper 40x60cm)
Various dithering examples
Some examples of dithering using bayes algorithm. But first the original (stable diffusion generated).
+20: Ana Hatherly
Há muitos, muitos anos, se isto se pode escrever da vida de alguém, há mais de +20, desenhei com um escantilhão estas estruturas a lápis. A motivação foi, lembro-me perfeitamente, ou antes o catalisador, o alfabeto estrutural de Ana Hatherly publicado em 1967. Não me lembro exactamente como o consultei na altura, agora está disponível no arquivo po-ex.net, mas imprimiu sobre mim, agora que recupero parte daquilo que ficou esquecido durante este tempo, numa tinta pastosa de difícil remoção, algo que não saiu.
As "cópias" que fiz na altura são estas e não tenho a certeza de ter entendido na altura o texto que copiei.
Laser engraving bitwise raster images
The motivation started after reading about Sleator's bitwise image on Knuth's "The Art of Computer Programming, Volume 4, Fascicle 1: Bitwise Tricks & Techniques".
It actually turned out very well!
Added a coat of white paint and repeated... mixed feelings about the result. Two laser passages, the first removing the white paint and the second to get a darker background.
Added two coats of water-varnish on both.
Last try with 3 passages, no paint or varnish on the final result.
Next step: Sierpinski triangles!
And finally a stray running dog.
Need to get some more wood squares blocks!
bit a bit
Uma das formas mais simples de gerar imagens num rectângulo, de uma
forma generativa, é usar os
índices de uma matriz, (x,y)
e efectuar o preenchimento dessa matriz com
o valor de uma função f(x,y)
. Ora uma das formas mais interessantes
de fazer isso é usando operações binárias bit-a-bit dos índices da
matriz.
Exemplificando usando o GNU/Octave:
bitxor(3,5)
dá 6
. A disjunção-exclusiva, xor
para os amigos, bit-a-bit de 3
com 5
dá 6
i.e.
3=011 5=101 6=3|5=110faz-se o
xor
bit-a-bit.
O código seguinte implementa e gera as imagens, com tamanho definido
por n
, neste caso 256x256
, usando a função bitxor
e fazendo no fim o
congruência módulo 9
(o resto inteiro da divisão por 9
).
############################################################ ## author: @tca@masto.pt ## date: 2022-11-03 [15:03] ## This program is public domain. timetag= floor(time*1000); n=256; [x y]=meshgrid([0:n-1],[0:n-1]); z=mod(bitxor(x,y),9); z=(z/max(max(z))); m=512; ## define o tamanho da imagem final ## por ordem inversa para ficarem bem ordenados figure(3) imshow(~logical(z)) print("-djpg", ["-S" num2str(m) "," num2str(m)], [num2str(timetag) "-negonebit-bitx" ".jpg"]) figure(2) imshow(logical(z)) print("-djpg", ["-S" num2str(m) "," num2str(m)], [num2str(timetag) "-onebit-bitx" ".jpg"]) figure(1) imshow(255*z) print("-djpg", ["-S" num2str(m) "," num2str(m)], [num2str(timetag) "-grey-bitx" ".jpg"])
Resultado de aplicação da expressão mod(bitor(x,y),9)
com coloração de 1bit apenas, obtida com a operação logical
dos
valores anteriores
e a sua negação
O link inicial dá-nos mais pistas e outras fórmulas que podemos usar. Seguem alguns exemplos.
Exemplos
triângulos de Sierpinski mod(bitor(x,y),3)
mod(127*(x-127),(y-127))
mod((x.*y).^9,3)
mod(mod(x,y),4)
bitand(bitand(x,y),mod(bitor(x,y),19)).*mod(127*(x-127),(y-63))
mod(64*x,y)
Numa outra qualquer linguagem de programação é possível repetir estes exemplos ou construir outros ;) Fico à espera dessas partilhas @tca@masto.pt!
Bons desenhos generativos!
P.S.
bitshift(bitshift(bitand(bitxor(x,bitcmp(y)),x-350),-3).^2,-12)
Sleator (1976, unpublished)
Refs.:
- The Art of Computer Programming, Volume 4, Fascicle 1: Bitwise Tricks & Techniques do Knuth tem umas coisas giras sobre isto.
Some impressionist pics
Estudo de cara
Desenhos generativo feitos pela polargraph com caneta BIC (1.6mm) em papel Canson A3 de 200g pintados com o resto da tinta da caneta que os fez.
Criado/Created: 2022
Última actualização/Last updated: 08-12-2022 [19:36]


(c) Tiago Charters de Azevedo