Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
16
Task/Munching-squares/EchoLisp/munching-squares.l
Normal file
16
Task/Munching-squares/EchoLisp/munching-squares.l
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
(lib 'types)
|
||||
(lib 'plot)
|
||||
(plot-size 512 512) ;; for example
|
||||
|
||||
;; use m = 16, 32, 44, .. to change the definition (number of losanges)
|
||||
(define (plot-munch (m 256))
|
||||
(define PIX (pixels->int32-vector)) ;; get canvas image
|
||||
(define (pcolor x y) ;; color at (x,y)
|
||||
(hsv->rgb
|
||||
(// (bitwise-xor (modulo x m) (modulo y m)) m)
|
||||
0.9
|
||||
0.9))
|
||||
(pixels-map pcolor PIX)
|
||||
(vector->pixels PIX)) ;; draw canvas image
|
||||
|
||||
(plot-much) ;; ESC to see tge drawing
|
||||
Loading…
Add table
Add a link
Reference in a new issue