April 5Apr 5 A special form of BINARY LAYERS: each new list is applied to the 1-values of the previous list, i.e., added. The next generation is then applied to 2, the next to 3, and so on. Like structure on structure on structure.I programmed it to read a kind of sample matrix, which results in a continuous replacement process that happens generatively, kind of a tree structure.Bildschirmaufnahme 2026-04-05 um 18.59.59.mov(defun binary-layers (seqs) (append (list (car seqs)) (loop repeat (1- (length seqs)) with seq = (car seqs) with seqcnt = 1 with interf = 1 collect (setf seq (loop for i in seq with cnt = 0 when (and (= i interf) (= (nth cnt (nth seqcnt seqs)) 1)) collect (+ i 1) else collect i when (> i (1- interf)) do (incf cnt))) do (incf seqcnt) do (incf interf)))) ;;;; EXAMPLES (binary-layers '((0 1 0 1 1 0 1) (0 1 0 1 1 0 0) (1 1 0 1 1 0 0) (1 0 1 1 1 0 0))) => ((0 1 0 1 1 0 1) (0 1 0 2 1 0 2) (0 1 0 3 1 0 3) (0 1 0 4 1 0 3)) (binary-layers '((1 1 0 1 1 0 0 1 0 1 1) (0 1 1 1 0 1 1 0 1 1 0) (1 1 1 1 0 1 1 0 0 1 0) (0 1 1 0 1 1 1 1 1 0 0))) => ((1 1 0 1 1 0 0 1 0 1 1) (1 2 0 2 2 0 0 1 0 2 2) (1 3 0 3 3 0 0 1 0 3 2) (1 3 0 4 4 0 0 1 0 3 2)) (binary-layers (loop repeat 10 collect (rnd-order '(1 1 0 1 1 0 0 1 0 1 1) :seed 243))) => ((0 1 1 1 1 0 0 1 1 0 1) (0 1 2 2 2 0 0 2 1 0 1) (0 1 2 3 3 0 0 3 1 0 1) (0 1 2 3 4 0 0 4 1 0 1) (0 1 2 3 4 0 0 5 1 0 1) (0 1 2 3 4 0 0 5 1 0 1) (0 1 2 3 4 0 0 5 1 0 1) (0 1 2 3 4 0 0 5 1 0 1) (0 1 2 3 4 0 0 5 1 0 1) (0 1 2 3 4 0 0 5 1 0 1)) ;; STATIC VIEW - LISTPLOT wit lists in list (list-plot (binary-layers (loop repeat 10 collect (rnd-order '(1 1 0 1 1 0 0 1 0 1 1) :seed 243))) :join-points t) ;; RANDOM VIEW + flatten all lists -> EVAL A FEW TIMES (list-plot (flatten (binary-layers (loop repeat 10 collect (rnd-order '(1 1 0 1 1 0 0 1 0 1 1))))) :join-points t) ;; EVAL TO SEE the structures for each generation - it's a kind of REWRITE (loop repeat 10 do (list-plot (binary-layers (loop repeat 10 collect (rnd-order '(1 1 0 1 1 0 0 1 0 1 1)))) :join-points t) do (sleep 2))
April 7Apr 7 Author interesting results with <dec-to-bin-rhythm>. kind of transitions and pattern by adding "binary counting"... (defun dec-to-bin-rhythm (ilist) (let ((span (find-max (mapcar 'length (decimal-to-binary ilist))))) (loop for i in (binary-rhythm span ilist 1 :type 1) collect (loop for x in i when (< x 0) append (gen-repeat (abs x) 0) else collect x)))) ;;;;;;;; (list-plot (flatten (binary-layers (list (flatten (dec-to-bin-rhythm (gen-integer 0 5))) (flatten (dec-to-bin-rhythm (gen-integer 7 0))) (flatten (dec-to-bin-rhythm (gen-integer 1 5)))))) :join-points t :style :fill) ;;;;;;;; (list-plot (flatten (binary-layers (list (flatten (dec-to-bin-rhythm (gen-integer 0 11))) (flatten (dec-to-bin-rhythm (gen-integer 7 1))) (flatten (dec-to-bin-rhythm (gen-integer 1 7)))))) :join-points t :style :fill)
Create an account or sign in to comment