HOME | DD

burtonsamograd — X-9

Published: 2015-02-08 04:28:15 +0000 UTC; Views: 353; Favourites: 1; Downloads: 0
Redirect to original
Description (eval-when (:compile-toplevel :load-toplevel)
  (require 'vecto))
(in-package :vecto)

(defun render (file)
  (let* ((w (/ 10800 1)) (h (/ 7200 1))
         (s (coerce (/ w 8) 'float)))
    (with-canvas (:width w :height h)
      (set-rgba-fill 1 1 1 1)
      (rectangle 0 0 w h)
      (fill-path)

      (dotimes (i 4)
        (do ((x 0 (incf x s)))
            ((> x w))
          (do ((y 0 (incf y s)))
              ((> y h))
            (set-rgba-fill (random 1.0) (random 1.0) (random 1.0) (random .9))
            (arc x y (1+ (random s)) 0 (* 2 pi))
            (fill-path)
            (set-rgba-stroke 0 0 0 (random 1.0))
            (set-line-width (1+ (random (/ s 16))))
            (arc x y (1+ (random s)) 0 (* 2 pi))
            (stroke)
            ))
        (setf s (/ s 2))
        )

      ;; signature
      (set-rgba-fill 0 0 0 1)
      (set-font (get-font "~/OCRABold.ttf") (/ w 128))
      (draw-string (- w (/ w 32)) (/ h 32) "X")
      (fill-path)

      (save-png file))))
(render "x-9.png")
;; burton samograd 2015
Related content
Comments: 0