# HG changeset patch # User Steve Losh # Date 1521088320 14400 # Node ID 859d1588e6ab1f19d391cdcfc0466877bd7b2636 # Parent 358eb20e7967a750cb63ae4aafae628ebd5d7bbb Add loom 6 diff -r 358eb20e7967 -r 859d1588e6ab src/robots/bit-loom.lisp --- a/src/robots/bit-loom.lisp Wed Mar 14 22:56:46 2018 -0400 +++ b/src/robots/bit-loom.lisp Thu Mar 15 00:32:00 2018 -0400 @@ -39,19 +39,25 @@ "full" (format nil "~R percent" (truncate (* 100 ratio)))))))) +(defun loom-6 (seed) + (destructuring-bind (points lines) + (flax.looms.006-tracing-lines::loom + seed "out" :png 1000 1000) + (format nil "~R lines of ~R points" lines points))) + (chancery:define-rule (select-loom :distribution :weighted) (1.0 1) (0.5 2) (0.2 3) (2.0 4) - (1.5 5)) + (1.0 5) + (1.0 6)) -(defparameter *looms* '(loom-1 loom-2 loom-3 loom-4 loom-5)) +(defparameter *looms* '(loom-1 loom-2 loom-3 loom-4 loom-5 loom-6)) (defun generate-image (seed &key force-loom) - (let* ((loom-index (random (length *looms*))) - (loom-index (1- (or force-loom (select-loom)))) + (let* ((loom-index (1- (or force-loom (select-loom)))) (loom (elt *looms* loom-index))) (format t "Running ~A~%" loom) (force-output)