changeset 477:ba54df21fc7c

complete first draft of touch.
author Robert McIntyre <rlm@mit.edu>
date Fri, 28 Mar 2014 22:51:14 -0400
parents 5a15611fbb9f
children 76d44e969289
files thesis/cortex.org
diffstat 1 files changed, 13 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/thesis/cortex.org	Fri Mar 28 22:09:03 2014 -0400
     1.2 +++ b/thesis/cortex.org	Fri Mar 28 22:51:14 2014 -0400
     1.3 @@ -1554,7 +1554,7 @@
     1.4      jMonkeyEngine3 community and is used to record audio for demo
     1.5      videos.
     1.6  
     1.7 -** Touch uses hundreds of hair-like elements
     1.8 +** COMMENT Touch uses hundreds of hair-like elements
     1.9  
    1.10     Touch is critical to navigation and spatial reasoning and as such I
    1.11     need a simulated version of it to give to my AI creatures.
    1.12 @@ -1588,7 +1588,7 @@
    1.13     of the feelers is determined by a UV-mapped image which shows where
    1.14     each feeler should be on the 3D surface of the body.
    1.15  
    1.16 -*** COMMENT Defining Touch Meta-Data in Blender
    1.17 +*** Defining Touch Meta-Data in Blender
    1.18  
    1.19      Each geometry can have a single UV map which describes the
    1.20      position of the feelers which will constitute its sense of touch.
    1.21 @@ -1602,6 +1602,7 @@
    1.22      #+caption: creature's body is sufficient.
    1.23      #+name: touch-meta-data
    1.24      #+begin_listing clojure
    1.25 +    #+BEGIN_SRC  clojure
    1.26  (defn tactile-sensor-profile
    1.27    "Return the touch-sensor distribution image in BufferedImage format,
    1.28     or nil if it does not exist."
    1.29 @@ -1615,21 +1616,21 @@
    1.30    [#^Geometry obj]
    1.31    (if-let [scale (meta-data obj "scale")]
    1.32      scale 0.1))
    1.33 +    #+END_SRC
    1.34      #+end_listing
    1.35  
    1.36      Here is an example of a UV-map which specifies the position of
    1.37      touch sensors along the surface of the upper segment of a fingertip.
    1.38  
    1.39 -
    1.40      #+caption: This is the tactile-sensor-profile for the upper segment 
    1.41      #+caption: of a fingertip. It defines regions of high touch sensitivity 
    1.42      #+caption: (where there are many white pixels) and regions of low 
    1.43      #+caption: sensitivity (where white pixels are sparse).
    1.44      #+name: fimgertip-UV
    1.45 -    #+ATTR_LaTeX: :width 10cm
    1.46 -    [[../images/finger-UV.png]]
    1.47 +    #+ATTR_LaTeX: :width 13cm
    1.48 +    [[./images/finger-UV.png]]
    1.49  
    1.50 -*** COMMENT Implementation Summary
    1.51 +*** Implementation Summary
    1.52    
    1.53      To simulate touch there are three conceptual steps. For each solid
    1.54      object in the creature, you first have to get UV image and scale
    1.55 @@ -1657,7 +1658,7 @@
    1.56        normalized coordinates of the tips of the feelers.
    1.57        (=feeler-tips=).
    1.58  
    1.59 -*** COMMENT Triangle Math
    1.60 +*** Triangle Math
    1.61  
    1.62      The rigid objects which make up a creature have an underlying
    1.63      =Geometry=, which is a =Mesh= plus a =Material= and other
    1.64 @@ -1675,6 +1676,7 @@
    1.65      #+caption: their verticies in both world and UV-coordinates.
    1.66      #+name: get-triangles
    1.67      #+begin_listing clojure
    1.68 +    #+BEGIN_SRC clojure
    1.69  (defn triangle
    1.70    "Get the triangle specified by triangle-index from the mesh."
    1.71    [#^Geometry geo triangle-index]
    1.72 @@ -1723,6 +1725,7 @@
    1.73          width (.getWidth image)]
    1.74      (map (partial pixel-triangle geo image)
    1.75           (range (.getTriangleCount (.getMesh geo))))))
    1.76 +    #+END_SRC
    1.77      #+end_listing
    1.78      
    1.79  *** The Affine Transform from one Triangle to Another
    1.80 @@ -1796,7 +1799,7 @@
    1.81      #+END_SRC
    1.82      #+end_listing
    1.83  
    1.84 -*** COMMENT Triangle Boundaries
    1.85 +*** Triangle Boundaries
    1.86    
    1.87  For efficiency's sake I will divide the tactile-profile image into
    1.88  small squares which inscribe each pixel-triangle, then extract the
    1.89 @@ -1847,7 +1850,7 @@
    1.90      #+END_SRC
    1.91      #+end_listing
    1.92  
    1.93 -*** COMMENT Feeler Coordinates
    1.94 +*** Feeler Coordinates
    1.95  
    1.96      The triangle-related functions above make short work of
    1.97      calculating the positions and orientations of each feeler in
    1.98 @@ -1919,7 +1922,7 @@
    1.99      #+END_SRC
   1.100      #+end_listing
   1.101  
   1.102 -*** COMMENT Simulated Touch
   1.103 +*** Simulated Touch
   1.104  
   1.105      Now that the functions to construct feelers are complete,
   1.106      =touch-kernel= generates functions to be called from within a