(define create-drawing (lambda (filename val1 val2 val3) (let ((leg-height (+ 60 (* 3.33 val1))) (leg-width 8) (body-height (+ 60 (* 6 val1))) (body-width 130) (head-diameter 50) (spot1-diameter (+ 1 (* 4 val2))) (spot2-diameter (+ 20 (* 2 val3))) (spot1-color (rgb.new (* 10 (random 25)) (+ 150 (* val1 val2)) (random 255))) (spot2-color (rgb.new (* (abs (cos val3)) 255) (random 255) (* 2 (* val1 (/ val2 (+ val3 1)))))) (leg-color (rgb.new (* 28 val1) (+ 100 (* 10 val2)) (- 100 (* 10 val3)))) (body-color (rgb.new (+ 128 (* pi val1)) (modulo (* 100 val3) 255) (- 200 (* 20 val2)))) (head-color (rgb.new (modulo (* 50 val3) 255) (random 255) (* 255 (abs (sin val1))))) (line-color (rgb.new (random 255) (random 200) (random 150))) (brushes (list "Circle (09)" "Circle (05)" "Circle (13)" "Circle Fuzzy (07)" "Circle Fuzzy (11)" "square (5x5)" "Circle Fuzzy (09)" "square (5x5) blur" "Pencil Sketch#2" "Circle Fuzzy (05)")) (cow-port (open-output-file filename))) (filled-rectangle.write cow-port leg-color 42 110 leg-width leg-height) (filled-rectangle.write cow-port leg-color 150 110 leg-width leg-height) (filled-ellipse.write cow-port body-color 35 (- 100 (* 0.5 body-height)) body-width body-height) (filled-circle.write cow-port head-color 5 50 head-diameter) (filled-circle.write cow-port spot1-color 60 80 spot1-diameter) (filled-circle.write cow-port spot2-color 110 100 spot2-diameter) (line.write cow-port line-color (list-ref brushes val2) 165 100 195 130) (empty-circle.write cow-port line-color (list-ref brushes val3) 5 50 head-diameter) (empty-circle.write cow-port line-color (list-ref brushes val1) 25 65 5) (line.write cow-port line-color (list-ref brushes val2) 12 90 30 80))))