orgmode.org — Results of Evaluation

(require "asdf")
(require "spinneret")
(require "generative")
(defun image-path (image)
  (format nil "/home/leon/Programming/Blog/images/gallery/iso_stacks_thick/~a.png" image))
(defun rel-image-path (image)
  (format nil "/images/gallery/iso_stacks_thick/~a.png" image))

(defparameter max-size 128)
(defparameter image-size (cons 1000 1000))
(defparameter padding 20)
(defun add-stack (origin size by thick axis add-rects)
  (let* ((limit (max-value (mult size axis))))
    (loop for n from 0 to (floor limit (+ by thick)) do
      (add-cuboid (add origin (mult axis (* n (+ by thick))))
                  (add (mult axis thick)
                       (mult size (sub (ivec3 1) axis)))
                  add-rects))))

(defun add-thick-stack (size-range step-range thick-range add-rects)
  (let* ((size (randrv (ivec3 (car size-range))
                       (ivec3 (cdr size-range))))
         (origin (randrv (ivec3 0)
                         (sub (ivec3 max-size) size)))
         (by (randrr step-range))
         (thick (randrr thick-range)))
         (add-stack origin size by thick (random-axis) add-rects)))

  (defparameter *images* '())
  (defun make-image (i)
    (let* ((seed (random-seed))
           (*random-state* (seed-state seed))
           (file-name (image-path i)))
      (with-image (add-rects *headers* *params*) file-name image-size padding
                  (defheader size max-size)
                  (defheader source "iso_stacks")
                  (defheader seed (format nil "#x~8,'0X" seed))

                  (defparam n-stacks (randr 2 15))
                  (defparam size-range (cons 20 100))
                  (defparam step-range (cons 1 20))
                  (defparam thick-range (cons 1 20))

                  (push (list i *headers* *params*) *images*)

                  (dotimes (i n-stacks)
                    (add-thick-stack size-range step-range thick-range add-rects)))))

  (loop for i from 0 to 30 do (make-image i))
(make-gallery *images*)
  • #xC0397054

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 11
  • #xBAD34960

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 7
  • #xC770414E

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 4
  • #x96CB0E26

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 14
  • #xB00CB0FA

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 12
  • #xBD2B66F4

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 11
  • #x2080E256

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 7
  • #xD7D8028A

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 11
  • #x5CCEE9DC

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 5
  • #xCF3281B2

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 8
  • #xB779CE2A

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 14
  • #x8BAF9FF7

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 6
  • #x864D6008

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 10
  • #xB9AF8FC1

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 13
  • #x16B4EE9D

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 12
  • #x522278F0

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 10
  • #xA6333536

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 12
  • #x8B363F84

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 9
  • #x70CCF887

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 6
  • #x5021787A

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 4
  • #x68CB3631

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 13
  • #x9EB20AB9

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 8
  • #xE9F2834A

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 14
  • #x03D50670

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 6
  • #x568EBF4E

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 10
  • #x7EBB6A08

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 9
  • #xE3B00228

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 3
  • #x746565B2

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 5
  • #x37444E81

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 7
  • #x4275CE10

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 5
  • #x41621ED3

    • thick-range: (1 . 20)
    • step-range: (1 . 20)
    • size-range: (20 . 100)
    • n-stacks: 7