# HG changeset patch # User Steve Losh # Date 1521082606 14400 # Node ID 358eb20e7967a750cb63ae4aafae628ebd5d7bbb # Parent ad6e9787c073ffc5aab225291e956756b6c865c6 Update flax API diff -r ad6e9787c073 -r 358eb20e7967 src/robots/bit-loom.lisp --- a/src/robots/bit-loom.lisp Tue Mar 06 22:47:04 2018 -0500 +++ b/src/robots/bit-loom.lisp Wed Mar 14 22:56:46 2018 -0400 @@ -29,10 +29,15 @@ "pure")))) (defun loom-5 (seed) - (let* ((points (* 100 (random-range-inclusive 1 100))) - (generator (flax.looms.005-simple-triangulations::loom - seed points "out" :png 1000 1000))) - (format nil "~R points, ~A generator" points generator))) + (let ((points (* 100 (random-range-inclusive 1 100)))) + (destructuring-bind (generator ratio) + (flax.looms.005-simple-triangulations::loom + seed points "out" :png 1000 1000) + (format nil "~R points, ~A generator, ~A triangulation" + points generator + (if (= 1 ratio) + "full" + (format nil "~R percent" (truncate (* 100 ratio)))))))) (chancery:define-rule (select-loom :distribution :weighted)