changeset 295:67a4e92d4628

made the hand 10x stronger
author Robert McIntyre <rlm@mit.edu>
date Thu, 16 Feb 2012 09:59:44 -0700
parents 76a5edd6507d
children 1eed471e2ebf
files assets/Models/test-creature/hand.blend org/integration.org org/movement.org
diffstat 3 files changed, 42 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
     1.1 Binary file assets/Models/test-creature/hand.blend has changed
     2.1 --- a/org/integration.org	Thu Feb 16 07:43:13 2012 -0700
     2.2 +++ b/org/integration.org	Thu Feb 16 09:59:44 2012 -0700
     2.3 @@ -31,6 +31,39 @@
     2.4  
     2.5  (def output-base (File. "/home/r/proj/cortex/render/hand"))
     2.6  
     2.7 +(def control-list
     2.8 + [
     2.9 +  0 ;;pointer-21 #<Vector3f (0.99999994, 0.0, 0.0)>
    2.10 +  1 ;;pointer-21 #<Vector3f (-0.99999994, 0.0, 0.0)>
    2.11 +  0 ;;thumb-11 #<Vector3f (-0.8802276, -0.39781287, -0.25873658)>
    2.12 +  0 ;;thumb-11 #<Vector3f (0.8485723, 0.46149826, 0.2587364)>
    2.13 +  0 ;;pointer-11 #<Vector3f (0.99999994, 0.0, 0.0)>
    2.14 +  0 ;;pointer-11 #<Vector3f (-0.99999994, 0.0, 0.0)>
    2.15 +  0 ;;thumb-2.0011 #<Vector3f (-0.71705645, -0.44753736, -0.5343599)>
    2.16 +  0 ;;thumb-2.0011 #<Vector3f (-0.10567085, 0.83862597, 0.53435963)>
    2.17 +  0 ;;middle-11 #<Vector3f (0.99999994, 0.0, 0.0)>
    2.18 +  0 ;;middle-11 #<Vector3f (-0.99999994, 0.0, 0.0)>
    2.19 +  0 ;;pointer-31 #<Vector3f (-0.99999994, 0.0, 0.0)>
    2.20 +  0 ;;pointer-31 #<Vector3f (0.99999994, 0.0, 0.0)>
    2.21 +  0 ;;middle-21 #<Vector3f (0.99999994, 0.0, 0.0)>
    2.22 +  0 ;;middle-21 #<Vector3f (-0.99999994, 0.0, 0.0)>
    2.23 +  0 ;;middle-31 #<Vector3f (-0.99999994, 0.0, 0.0)>
    2.24 +  0 ;;middle-31 #<Vector3f (0.99999994, 0.0, 0.0)>
    2.25 +  0 ;;pinky-21 #<Vector3f (0.99999994, 0.0, 0.0)>
    2.26 +  0 ;;pinky-21 #<Vector3f (-0.99999994, 0.0, 0.0)>
    2.27 +  0 ;;pinky-31 #<Vector3f (0.99999994, 0.0, 0.0)>
    2.28 +  0 ;;ring-31 #<Vector3f (0.99999994, 0.0, 0.0)>
    2.29 +  0 ;;ring-31 #<Vector3f (-0.99999994, 0.0, 0.0)>
    2.30 +  0 ;;ring-21 #<Vector3f (-0.99999994, 0.0, 0.0)>
    2.31 +  0 ;;ring-21 #<Vector3f (0.99999994, 0.0, 0.0)>
    2.32 +  0 ;;ring-11 #<Vector3f (0.99999994, 0.0, 0.0)>
    2.33 +  0 ;;ring-11 #<Vector3f (-0.99999994, 0.0, 0.0)>
    2.34 +  0 ;;thumb-11 #<Vector3f (-0.43154645, 0.7302033, 0.5296894)>
    2.35 +  0 ;;thumb-11 #<Vector3f (-0.8032993, -0.2722854, -0.5296895)>
    2.36 +  0 ;;pinky-11 #<Vector3f (-0.99999994, 0.0, 0.0)>
    2.37 +  0 ;;pinky-11 #<Vector3f (0.99999994, 0.0, 0.0)>
    2.38 +  ])
    2.39 +
    2.40  (defn test-everything! 
    2.41    ([] (test-everything! false))
    2.42    ([record?]
    2.43 @@ -93,7 +126,13 @@
    2.44         ;;(touch-display (map #(% (.getRootNode world)) touch))
    2.45         ;;(vision-display (map #(% world) vision))
    2.46         ;;(hearing-display (map #(% world) hearing))
    2.47 -       (muscle-display (map #(% @muscle-exertion) muscles))
    2.48 +
    2.49 +       (muscle-display
    2.50 +        (map (fn [effector control]
    2.51 +               (effector (int (* @muscle-exertion control))))
    2.52 +             muscles
    2.53 +             control-list))
    2.54 +             
    2.55         (.setLocalTranslation me (.getLocation (.getCamera world)))
    2.56         (fix-display world))))))
    2.57  #+end_src
     3.1 --- a/org/movement.org	Thu Feb 16 07:43:13 2012 -0700
     3.2 +++ b/org/movement.org	Thu Feb 16 09:59:44 2012 -0700
     3.3 @@ -122,6 +122,8 @@
     3.4          (vec (map  #(float (* strength (/ % (last pool-integral))))
     3.5                pool-integral))
     3.6          control (.getControl target RigidBodyControl)]
     3.7 +    (println-repl "adding muscle to" (.getName target))
     3.8 +    (println-repl "points" axis)
     3.9      (fn [n]
    3.10        (let [pool-index (max 0 (min n (dec (count pool))))
    3.11              force (force-index pool-index)]