diff org/movement.org @ 304:2dfebf71053c

Merged Winston cover letter
author Dylan Holmes <ocsenave@gmail.com>
date Sat, 18 Feb 2012 02:07:40 -0600
parents 1eed471e2ebf
children 7e7f8d6d9ec5
line wrap: on
line diff
     1.1 --- a/org/movement.org	Sat Feb 18 02:06:06 2012 -0600
     1.2 +++ b/org/movement.org	Sat Feb 18 02:07:40 2012 -0600
     1.3 @@ -14,31 +14,31 @@
     1.4  force in the human body at all!  (A straight line of force would
     1.5  correspond to some sort of jet or rocket propulsion.)
     1.6  
     1.7 -*(next paragraph is from memory and needs to be checked!)*
     1.8 -
     1.9 -In humans, muscles are composed of millions of sarcomeres, which can
    1.10 -contract to exert force. A single motor neuron might control 100-1,000
    1.11 -sarcomeres. When the motor neuron is engaged by the brain, it
    1.12 -activates all of the sarcomeres to which it is attached. Some motor
    1.13 -neurons command many sarcomeres, and some command only a few. The
    1.14 -spinal cord generally engages the motor neurons which control few
    1.15 -sarcomeres before the motor neurons which control many sarcomeres.
    1.16 -This recruitment stragety allows for percise movements at low
    1.17 -strength. The collection of all motor neurons that control a muscle is
    1.18 -called the motor pool. The brain essentially says "activate 30% of the
    1.19 -motor pool" and the spinal cord recruits motor neurons untill 30% are
    1.20 -activated. Since the distribution of power among motor neurons is
    1.21 -unequal and recruitment goes from weakest to strongest, the first 30%
    1.22 -of the motor pool might be 5% of the strength of the muscle.
    1.23 +In humans, muscles are composed of muscle fibers which can contract to
    1.24 +exert force. The muscle fibers which compose a muscle are partitioned
    1.25 +into discrete groups which are each controlled by a single alpha motor
    1.26 +neuton. A single alpha motor neuron might control as little as three
    1.27 +or as many as one thousand muscle fibers. When the alpha motor neuron
    1.28 +is engaged by the spinal cord, it activates all of the muscle fibers
    1.29 +to which it is attached. The spinal cord generally engages the alpha
    1.30 +motor neurons which control few muscle fibers before the motor neurons
    1.31 +which control many muscle fibers.  This recruitment stragety allows
    1.32 +for percise movements at low strength. The collection of all motor
    1.33 +neurons that control a muscle is called the motor pool. The brain
    1.34 +essentially says "activate 30% of the motor pool" and the spinal cord
    1.35 +recruits motor neurons untill 30% are activated. Since the
    1.36 +distribution of power among motor neurons is unequal and recruitment
    1.37 +goes from weakest to strongest, the first 30% of the motor pool might
    1.38 +be 5% of the strength of the muscle.
    1.39  
    1.40  My simulated muscles follow a similiar design: Each muscle is defined
    1.41  by a 1-D array of numbers (the "motor pool"). Each entry in the array
    1.42 -represents a motor neuron which controlls a number of sarcomeres equal
    1.43 -to the value of the entry. A muscle also has a scalar :strength factor
    1.44 -which determines the total force the muscle can exert when all motor
    1.45 -neurons are activated.  The effector function for a muscle takes a
    1.46 -number to index into the motor pool, and that number "activates" all
    1.47 -the motor neurons whose index is lower or equal to the number.  Each
    1.48 +represents a motor neuron which controlls a number of muscle fibers
    1.49 +equal to the value of the entry. Each muscle has a scalar strength
    1.50 +factor which determines the total force the muscle can exert when all
    1.51 +motor neurons are activated.  The effector function for a muscle takes
    1.52 +a number to index into the motor pool, and then "activates" all the
    1.53 +motor neurons whose index is lower or equal to the number.  Each
    1.54  motor-neuron will apply force in proportion to its value in the array.
    1.55  Lower values cause less force.  The lower values can be put at the
    1.56  "beginning" of the 1-D array to simulate the layout of actual human
    1.57 @@ -118,13 +118,14 @@
    1.58          
    1.59          pool (motor-pool muscle)
    1.60          pool-integral (reductions + pool)
    1.61 -        force-index
    1.62 +        forces
    1.63          (vec (map  #(float (* strength (/ % (last pool-integral))))
    1.64                pool-integral))
    1.65          control (.getControl target RigidBodyControl)]
    1.66 +    (println-repl (.getName target) axis)
    1.67      (fn [n]
    1.68        (let [pool-index (max 0 (min n (dec (count pool))))
    1.69 -            force (force-index pool-index)]
    1.70 +            force (forces pool-index)]
    1.71          (.applyTorque control (.mult axis force))
    1.72          (float (/ force strength))))))
    1.73  
    1.74 @@ -175,9 +176,16 @@
    1.75  
    1.76  * Adding Touch to the Worm
    1.77  
    1.78 +To the worm, I add two new nodes which describe a single muscle. 
    1.79 +
    1.80 +#+attr_html: width=755
    1.81 +#+caption: The node highlighted in orange is the parent node of all muscles in the worm.  The arrow highlighted in yellow represents the creature's single muscle, which moves the top segment.  The other nodes which are not highlighted are joints, eyes, and ears.
    1.82 +[[../images/worm-with-muscle.png]]
    1.83 +
    1.84 +#+name: test-movement
    1.85  #+begin_src clojure
    1.86 -(defn test-movement
    1.87 -  ([] (test-movement false))
    1.88 +(defn test-worm-movement
    1.89 +  ([] (test-worm-movement false))
    1.90    ([record?]
    1.91       (let [creature (doto (worm) (body!))
    1.92  
    1.93 @@ -211,11 +219,7 @@
    1.94                          (Vector3f. -4.912815, 2.004171, 0.15710819))
    1.95            (.setRotation (.getCamera world)
    1.96                          (Quaternion. 0.13828252, 0.65516764, 
    1.97 -                                     -0.12370994, 0.7323449))
    1.98 -
    1.99 -          (comment 
   1.100 -            (com.aurellem.capture.Capture/captureVideo
   1.101 -             world (file-str "/home/r/proj/ai-videos/hand"))))
   1.102 +                                     -0.12370994, 0.7323449)))
   1.103          (fn [world tpf]
   1.104            (muscle-display
   1.105             (map #(% @muscle-exertion) muscles)
   1.106 @@ -240,7 +244,6 @@
   1.107  </div>
   1.108  #+end_html
   1.109  
   1.110 -
   1.111  ** Making the Worm Muscles Video
   1.112  #+name: magick7
   1.113  #+begin_src clojure
   1.114 @@ -304,11 +307,9 @@
   1.115    (:import java.io.File)
   1.116    (:import java.awt.image.BufferedImage)
   1.117    (:import com.jme3.scene.Node)
   1.118 -  (:import com.jme3.math.Vector3f)
   1.119 +  (:import (com.jme3.math Quaternion Vector3f))
   1.120    (:import (com.aurellem.capture Capture RatchetTimer))
   1.121    (:import com.jme3.bullet.control.RigidBodyControl))
   1.122 -
   1.123 -(cortex.import/mega-import-jme3)
   1.124  #+end_src
   1.125  
   1.126  * Source Listing