[ prog / sol / mona ]
prog
frontpage - thread list - new thread - preferences - ?
- 257 2023-05-02 22:54
-
(lambda (spec expandx expandy) (lambda (self var x y sizex sizey) (if (= sizex 1) var ((lambda (subx suby) ((lambda (qx mx qy my) (self self (vector-ref (vector-ref spec var) (+ (* qy expandx) qx)) mx my subx suby)) (quotient x subx) (modulo x subx) (quotient y suby) (modulo y suby))) (quotient sizex expandx) (quotient sizey expandy))))) ((lambda (size) (lambda (cellx celly expandx expandy levels) (list (size cellx expandx levels) (size celly expandy levels)))) (lambda (start expand levels) (* start (expt expand levels)))) (lambda (spec columns) (lambda (index dx dy) (vector-ref (vector-ref spec index) (+ (* dy columns) dx)))) (lambda (patch band cycle columnfactor n k j) ((lambda (k j) ((lambda (dx dy) (if (or (= dx 0) (= dy 0)) 0 (+ (patch (- cycle 1) (quotient (- (+ k j) dx) band) (quotient (- (- k j) dy) band) dx dy band) 1))) (modulo (+ k j) band) (modulo (- k j) band))) (- k n) (- j (* columnfactor n)))) (lambda (spec band) ((lambda (b2 on) (lambda (index dx dy) (if (zero? index) #f ((lambda (bits) (or (and (= dy b2) (or (= dx b2) (on 0 bits) (and (< dx b2) (on 1 bits)) (and (> dx b2) (on 2 bits)))) (and (= dx b2) (or (on 3 bits) (and (< dy b2) (on 4 bits)) (and (> dy b2) (on 5 bits)))) (and (= dx dy) (or (on 6 bits) (and (< dx b2) (on 7 bits)) (and (> dx b2) (on 8 bits)))) (and (= (+ dx dy) band) (or (on 9 bits) (and (< dx b2) (on 10 bits)) (and (> dx b2) (on 11 bits)))))) (vector-ref spec index))))) (quotient band 2) logbit?)) #(#f 1 8 36 34 20 18 33 17 10 12 64 512 132 1028 2050 258 160 2080 1040 272 2304 1152 1280 2176) '(((#f 6) (#f 1) (#t 1 3) (#f 4) (#f 1) (#f 5) (#t 1 6) (#f 1) (#f 3)) ((#t 1 4) (#f 1) (#f 5) (#f 6) (#f 1) (#f 3) (#f 4) (#f 1) (#t 1 5))) 3 3 '(((#f 6) (#f 0) (#t 4 5) (#f 1) (#f 4) (#f 2) (#t 4 6) (#f 0) (#f 5)) ((#t 0 1) (#f 4) (#f 2) (#f 6) (#f 0) (#f 5) (#f 1) (#f 4) (#t 0 2))) 3 3 1 0 "🌵🌹🌺🌼🌸🌻🌷💮🦋" 6 1 19))
- 267
-