changeset 227:2a7f57e7efdb

working on touch.org
author Robert McIntyre <rlm@mit.edu>
date Sat, 11 Feb 2012 14:12:17 -0700
parents e5db1d2ff9a8
children 0589c35f04f2
files org/ideas.org org/touch.org
diffstat 2 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/org/ideas.org	Sat Feb 11 12:53:18 2012 -0700
     1.2 +++ b/org/ideas.org	Sat Feb 11 14:12:17 2012 -0700
     1.3 @@ -76,6 +76,7 @@
     1.4   - [ ] project proposals for Winston                    \
     1.5   - [ ] additional senses to be implemented for Winston   |  -- 2 days 
     1.6   - [ ] send Winston package                             /
     1.7 + - [ ] fix videos that were encoded wrong, test on InterNet Explorer.
     1.8  
     1.9  ** would be cool to get done before winston
    1.10   - [X] enable greyscale bitmaps for touch -- 2 hours 
    1.11 @@ -99,6 +100,8 @@
    1.12   - [ ] upgrade to clojure 1.3, replace all defvars with new def
    1.13  
    1.14  
    1.15 +
    1.16 +
    1.17  ;;In the elder days of Art,
    1.18  ;;Builders wrought with greatest care
    1.19  ;;Each minute and unseen part;
     2.1 --- a/org/touch.org	Sat Feb 11 12:53:18 2012 -0700
     2.2 +++ b/org/touch.org	Sat Feb 11 14:12:17 2012 -0700
     2.3 @@ -17,7 +17,7 @@
     2.4  
     2.5  (defn triangles
     2.6    "Return a sequence of all the Triangles which compose a given
     2.7 -  Geometry." 
     2.8 +   Geometry." 
     2.9    [#^Geometry geom]
    2.10    (let
    2.11        [mesh (.getMesh geom)
    2.12 @@ -63,7 +63,7 @@
    2.13    (if-let [image-path (meta-data obj "touch")]
    2.14      (load-image image-path)))
    2.15  
    2.16 -(defn triangle
    2.17 +(defn mesh-triangle
    2.18    "Get the triangle specified by triangle-index from the mesh within
    2.19    bounds."
    2.20    [#^Mesh mesh triangle-index]
    2.21 @@ -80,7 +80,7 @@
    2.22      (vec indices)))
    2.23  
    2.24  (defn vertex-UV-coord
    2.25 -  "Get the uv-coordinates of the vertex named by vertex-index"
    2.26 +  "Get the UV-coordinates of the vertex named by vertex-index"
    2.27    [#^Mesh mesh vertex-index]
    2.28    (let [UV-buffer
    2.29          (.getData
    2.30 @@ -91,7 +91,7 @@
    2.31       (.get UV-buffer (+ 1 (* vertex-index 2)))]))
    2.32  
    2.33  (defn triangle-UV-coord
    2.34 -  "Get the uv-cooridnates of the triangle's verticies."
    2.35 +  "Get the UV-cooridnates of the triangle's verticies."
    2.36    [#^Mesh mesh width height triangle-index]
    2.37    (map (fn [[u v]] (vector (* width u) (* height v)))
    2.38         (map (partial vertex-UV-coord mesh)
    2.39 @@ -200,7 +200,7 @@
    2.40                  (white-coordinates image bounds))
    2.41          UV->geometry (triangle-transformation
    2.42                        cutout-triangle
    2.43 -                      (triangle mesh tri-index))
    2.44 +                      (mesh-triangle mesh tri-index))
    2.45          geometry-sensor-coords
    2.46          (map (fn [[u v]] (.mult UV->geometry (Vector3f. u v 0)))
    2.47               UV-sensor-coords)]