Concatenative topics
Concatenative meta
Other languages
Meta
Viznut is a demoscene artist who found the following bitart pattern that looks like birds flying rightward, the pattern can be seen in the Permacomputing Aesthetics paper:
abs(((x + y) & (x - y)) % 24) > 9
@viznut ( -> ) ( theme ) #0f08 DEOk INC INC DEOk INC INC DEO ( viewp ) #0100 #22 DEO2k INC INC DEO2 #0000 &>x ( -- ) DUP #29 DEO #0000 &>y ( -- ) DUP #2b DEO ( x y + ) ADD2k STH2 ( x y - ) SUB2k STH2r ( &24 % ) AND2 #0018 DIV2k MUL2 SUB2 ( 9 > ) #0009 GTH2 #2e DEO INC2 DUP ?&>y POP2 INC2 DUP ?&>x POP2 BRK
USING: accessors byte-vectors images images.viewer kernel math ranges sequences sequences.deep ; IN: capital.viznut : bitbash ( -- bits ) 256 [1..b] dup [ swap [ + ] [ - ] 2bi bitand 24 mod abs 9 > 255 0 ? ] cartesian-map flatten >byte-vector ; : viznut ( -- image ) <image> { 256 256 } >>dim bitbash >>bitmap L >>component-order ubyte-components >>component-type ; ! Run inside the listener: viznut image.
:N 256; :rem dup2 / * -; :idx2 over2 nip over; ( ppm header ) 'P .c '1 .c .nl N . N . ( pixels ) N [ N [ idx2 N !- swap N !- dup2 + swap rot swap - & 24 rem 9 > \'0 \'1 ifte .c ] dotimes ] dotimes
* crc:drawing * formula-art :birds [ xy n:add xy n:sub and #24 n:mod n:abs #9 gt? ] draw:with-formula ; birds
This revision created on Sun, 10 Mar 2024 19:51:53 by crc (add konilo implementation)