Custom tile existence function >>176 to remove the center tile of every 3x3 block.
scheme@(guile-user)> (display ((lambda (rec xjoin extract exists overlaps spec chars n) ((lambda (xjoin lines columns grid) ((lambda (symbol) (xjoin lines (lambda (k) (string-append (xjoin columns (lambda (j) (symbol k j)) "") "\n")) "")) (lambda (k j) (extract chars (grid k j) 1)))) (lambda (n fun sep) (rec xjoin n fun sep "")) (* 4 n) (* 8 n) ((lambda (cell split) ((lambda (corner) (lambda (k j) (apply (lambda (kd km jd jm) (if (= jm 3) (if (or (= km 1) (= km 2)) 0 (if (exists (+ (* 2 kd) 1) jd) 1 0)) (if (= jm 7) (if (= km 1) (if (exists (* 2 kd) (+ jd 1)) 1 0) (if (= km 2) (if (exists (+ (* 2 kd) 2) (+ jd 1)) 1 0) 0)) (apply (lambda (up k left j) (corner (if (eq? up left) 2 3) (+ (* 2 kd) (if up 0 1)) (+ jd (if (and up (not left)) 1 0)) (+ (* 2 kd) (if up 1 2)) (+ jd (if (not (or up left)) 1 0)) (not (eq? up left)) k j)) `(,@(split km 2) ,@(split jm 4)))))) `(,(quotient k 4) ,(modulo k 4) ,(quotient j 8) ,(modulo j 8))))) (lambda (id firstk firstj secondk secondj left k j) (if (exists firstk firstj) (if (exists secondk secondj) (cell (if (overlaps firstk firstj left) id (- 3 id)) 1 k j) (cell id 0 k j)) (if (exists secondk secondj) (cell (- 3 id) 0 k j) 0))))) (lambda (corner double k j) (vector-ref (vector-ref (vector-ref spec corner) double) (+ (* 3 k) j))) (lambda (k limit) (if (< k limit) `(#t ,k) `(#f ,(- k limit))))))) (lambda (f . args) (apply f (cons f args))) (lambda (self n fun sep acc) (if (<= n 0) "" (if (= n 1) (string-append (fun 0) acc) (self self (- n 1) fun sep (string-append sep (fun (- n 1)) acc))))) (lambda (str pos len) (substring str pos (+ pos len))) (lambda (k j) (not (or (and (= (modulo k 6) 2) (= (modulo j 3) 1)) (and (= (modulo k 6) 5) (= (modulo j 3) 2))))) (lambda (k j left) (eq? (even? k) left)) #(#(#(1 1 4 0 0 2) #(8 1 4 0 0 10)) #(#(3 1 1 2 0 0) #(3 1 8 9 0 0)) #(#(0 0 2 1 1 6) #(0 0 10 7 1 6)) #(#(2 0 0 5 1 1) #(9 0 0 5 1 7))) " ─│┌┐└┘┬┴┤├" 5))
┌─┴─┤ ┌─┴─┤ ┌─┴─┤ ┌─┴─┤ ┌─┴─┤
┤ └─┬─┤ └─┬─┤ └─┬─┤ └─┬─┤ └─┬─
┴─┐ │ │ ├─┴─┐ ├─┴─┐ │ │ ├─
├───┘ └───┬─┘ ├─┬─┘ ├───┘ └───┬─┘
┌─┴───┐ ┌───┤ ┌─┴─┤ ┌─┴───┐ ┌───┤
┤ │ │ └─┬─┤ └─┬─┤ │ │ └─┬─
┴─┐ ├─┴─┐ ├─┴─┐ ├─┴─┐ ├─┴─┐ ├─
├─┬─┘ ├─┬─┘ ├─┬─┘ ├─┬─┘ ├─┬─┘
┌─┴─┤ ┌─┴─┤ │ │ ┌─┴─┤ ┌─┴─┤
┤ └─┬─┤ └─┬───┘ └───┤ └─┬─┤ └─┬─
┴─┐ ├─┴─┐ ├───┐ ┌───┴─┐ ├─┴─┐ ├─
├─┬─┘ ├─┬─┘ │ │ ├─┬─┘ ├─┬─┘
┌─┴─┤ ┌─┴─┤ ┌─┴─┤ ┌─┴─┤ ┌─┴─┤
┤ └─┬─┤ └─┬─┤ └─┬─┤ └─┬─┤ └─┬─
┴─┐ │ │ ├─┴─┐ ├─┴─┐ │ │ ├─
├───┘ └───┬─┘ ├─┬─┘ ├───┘ └───┬─┘
┌─┴───┐ ┌───┤ ┌─┴─┤ ┌─┴───┐ ┌───┤
┤ │ │ └─┬─┤ └─┬─┤ │ │ └─┬─
┴─┐ ├─┴─┐ ├─┴─┐ ├─┴─┐ ├─┴─┐ ├─
├─┬─┘ ├─┬─┘ ├─┬─┘ ├─┬─┘ ├─┬─┘
scheme@(guile-user)>
larger version: http://paste.textboard.org/8e1bf5dc/raw
in the next episode: >>17
I think this is one of best threads on /prog/. It is eye candy.
Thanks! There will be a few more flower garden posts at some point.