# HG changeset patch # User Robert McIntyre # Date 1326529158 25200 # Node ID 940074adc1d5e7602bbb111dc66ebc98b49fd7e9 # Parent b7a3ba5e879b758130d6abf3670e38db02b30590 can visualize a collection of points now. diff -r b7a3ba5e879b -r 940074adc1d5 org/test-creature.org --- a/org/test-creature.org Sat Jan 14 01:07:18 2012 -0700 +++ b/org/test-creature.org Sat Jan 14 01:19:18 2012 -0700 @@ -94,8 +94,25 @@ (.setSize frame (+ 8 (.getWidth i)) (+ 28 (.getHeight i))) (.repaint panel 0 0 (.getWidth i) (.getHeight i))))) +(defn points->image + "Take a sparse collection of points and visuliaze it as a + BufferedImage." + [points] + (let [xs (map first points) + ys (map second points) + width (- (apply max xs) (apply min xs)) + height (- (apply max ys) (apply min ys)) + image (BufferedImage. width height + BufferedImage/TYPE_BYTE_BINARY) + -(defn visualize [points] + + )) + + + + +;;(defn visualize [points]