Mercurial > cortex
changeset 241:f2e583be8584
saving progress...
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sun, 12 Feb 2012 13:30:42 -0700 |
parents | 6961377c4554 |
children | a7f26a074071 |
files | org/touch.org |
diffstat | 1 files changed, 11 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
1.1 --- a/org/touch.org Sun Feb 12 13:25:42 2012 -0700 1.2 +++ b/org/touch.org Sun Feb 12 13:30:42 2012 -0700 1.3 @@ -250,12 +250,18 @@ 1.4 transforms (feeler-pixel-coords geo image)))) 1.5 1.6 (defn feeler-tips [#^Geometry geo image] 1.7 - (let [origins (feeler-origins geo image)] 1.8 - ( 1.9 + (let [origins (feeler-origins geo image) 1.10 + normals 1.11 + (map 1.12 + (fn [triangle] 1.13 + (.calculateNormal triangle) 1.14 + (.clone (.getNormal triangle))) 1.15 + (map ->triangle (triangles geo)))] 1.16 + (map #(.add %1 %2) origins normals))) 1.17 + 1.18 +(defn touch-topology [#^Geometry geo image] 1.19 + (collapse (feeler-pixel-coords geo image))) 1.20 1.21 -) 1.22 - 1.23 - 1.24 1.25 (defn sensors-in-triangle 1.26 "Locate the touch sensors in the triangle, returning a map of their