# HG changeset patch # User Robert McIntyre # Date 1329078642 25200 # Node ID f2e583be858460969a4744db027e9f5b4edd9a1f # Parent 6961377c4554f8b2fbe4d2314084b7afa6140904 saving progress... diff -r 6961377c4554 -r f2e583be8584 org/touch.org --- a/org/touch.org Sun Feb 12 13:25:42 2012 -0700 +++ b/org/touch.org Sun Feb 12 13:30:42 2012 -0700 @@ -250,12 +250,18 @@ transforms (feeler-pixel-coords geo image)))) (defn feeler-tips [#^Geometry geo image] - (let [origins (feeler-origins geo image)] - ( + (let [origins (feeler-origins geo image) + normals + (map + (fn [triangle] + (.calculateNormal triangle) + (.clone (.getNormal triangle))) + (map ->triangle (triangles geo)))] + (map #(.add %1 %2) origins normals))) + +(defn touch-topology [#^Geometry geo image] + (collapse (feeler-pixel-coords geo image))) -) - - (defn sensors-in-triangle "Locate the touch sensors in the triangle, returning a map of their