comparison org/movement.org @ 278:4c07724c4f0a

removed useless code in movement
author Robert McIntyre <rlm@mit.edu>
date Wed, 15 Feb 2012 10:25:54 -0700
parents bded932ef696
children 23aadf376e9d
comparison
equal deleted inserted replaced
277:bded932ef696 278:4c07724c4f0a
14 force in the human body at all! (A straight line of force would 14 force in the human body at all! (A straight line of force would
15 correspond to some sort of jet or rocket propulsion.) 15 correspond to some sort of jet or rocket propulsion.)
16 16
17 *(next paragraph is from memory and needs to be checked!)* 17 *(next paragraph is from memory and needs to be checked!)*
18 18
19 In humans, muscles are composed of millions of sarcomeres, which can 19 In humans, muscles are composed of muscle fibers which can contract to
20 contract to exert force. A single motor neuron might control 100-1,000 20 exert force. The muscle fibers which compose a muscle are partitioned
21 sarcomeres. When the motor neuron is engaged by the brain, it 21 into discrete groups which are each controlled by a single alpha motor
22 activates all of the sarcomeres to which it is attached. Some motor 22 neuton. A single alpha motor neuron might control as little as three
23 neurons command many sarcomeres, and some command only a few. The 23 or as many as one thousand muscle fibers. When the alpha motor neuron
24 spinal cord generally engages the motor neurons which control few 24 is engaged by the spinal cord, it activates all of the muscle fibers
25 sarcomeres before the motor neurons which control many sarcomeres. 25 to which it is attached. The spinal cord generally engages the alpha
26 This recruitment stragety allows for percise movements at low 26 motor neurons which control few muscle fibers before the motor neurons
27 strength. The collection of all motor neurons that control a muscle is 27 which control many muscle fibers. This recruitment stragety allows
28 called the motor pool. The brain essentially says "activate 30% of the 28 for percise movements at low strength. The collection of all motor
29 motor pool" and the spinal cord recruits motor neurons untill 30% are 29 neurons that control a muscle is called the motor pool. The brain
30 activated. Since the distribution of power among motor neurons is 30 essentially says "activate 30% of the motor pool" and the spinal cord
31 unequal and recruitment goes from weakest to strongest, the first 30% 31 recruits motor neurons untill 30% are activated. Since the
32 of the motor pool might be 5% of the strength of the muscle. 32 distribution of power among motor neurons is unequal and recruitment
33 goes from weakest to strongest, the first 30% of the motor pool might
34 be 5% of the strength of the muscle.
33 35
34 My simulated muscles follow a similiar design: Each muscle is defined 36 My simulated muscles follow a similiar design: Each muscle is defined
35 by a 1-D array of numbers (the "motor pool"). Each entry in the array 37 by a 1-D array of numbers (the "motor pool"). Each entry in the array
36 represents a motor neuron which controlls a number of sarcomeres equal 38 represents a motor neuron which controlls a number of muscle fibers
37 to the value of the entry. A muscle also has a scalar :strength factor 39 equal to the value of the entry. Each muscle has a scalar strength
38 which determines the total force the muscle can exert when all motor 40 factor which determines the total force the muscle can exert when all
39 neurons are activated. The effector function for a muscle takes a 41 motor neurons are activated. The effector function for a muscle takes
40 number to index into the motor pool, and that number "activates" all 42 a number to index into the motor pool, and then "activates" all the
41 the motor neurons whose index is lower or equal to the number. Each 43 motor neurons whose index is lower or equal to the number. Each
42 motor-neuron will apply force in proportion to its value in the array. 44 motor-neuron will apply force in proportion to its value in the array.
43 Lower values cause less force. The lower values can be put at the 45 Lower values cause less force. The lower values can be put at the
44 "beginning" of the 1-D array to simulate the layout of actual human 46 "beginning" of the 1-D array to simulate the layout of actual human
45 muscles, which are capable of more percise movements when exerting 47 muscles, which are capable of more percise movements when exerting
46 less force. Or, the motor pool can simulate more exoitic recruitment 48 less force. Or, the motor pool can simulate more exoitic recruitment
173 (view-sense movement-display-kernel)) 175 (view-sense movement-display-kernel))
174 #+end_src 176 #+end_src
175 177
176 * Adding Touch to the Worm 178 * Adding Touch to the Worm
177 179
178 To the worm, I add a two new nodes which describe a single muscle. 180 To the worm, I add two new nodes which describe a single muscle.
179 181
180 #+attr_html: width=755 182 #+attr_html: width=755
181 #+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. 183 #+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.
182 [[../images/worm-with-muscle.png]] 184 [[../images/worm-with-muscle.png]]
183
184
185 185
186 #+begin_src clojure 186 #+begin_src clojure
187 (defn test-movement 187 (defn test-movement
188 ([] (test-movement false)) 188 ([] (test-movement false))
189 ([record?] 189 ([record?]
217 (set-gravity world (Vector3f. 0 0 0)) 217 (set-gravity world (Vector3f. 0 0 0))
218 (.setLocation (.getCamera world) 218 (.setLocation (.getCamera world)
219 (Vector3f. -4.912815, 2.004171, 0.15710819)) 219 (Vector3f. -4.912815, 2.004171, 0.15710819))
220 (.setRotation (.getCamera world) 220 (.setRotation (.getCamera world)
221 (Quaternion. 0.13828252, 0.65516764, 221 (Quaternion. 0.13828252, 0.65516764,
222 -0.12370994, 0.7323449)) 222 -0.12370994, 0.7323449)))
223
224 (comment
225 (com.aurellem.capture.Capture/captureVideo
226 world (file-str "/home/r/proj/ai-videos/hand"))))
227 (fn [world tpf] 223 (fn [world tpf]
228 (muscle-display 224 (muscle-display
229 (map #(% @muscle-exertion) muscles) 225 (map #(% @muscle-exertion) muscles)
230 (if record? 226 (if record?
231 (File. "/home/r/proj/cortex/render/worm-muscles/muscles")))))))) 227 (File. "/home/r/proj/cortex/render/worm-muscles/muscles"))))))))
245 the power output of the muscle . Each jump causes 20 more motor neurons to 241 the power output of the muscle . Each jump causes 20 more motor neurons to
246 be recruited. Notice that the power output increases non-linearly 242 be recruited. Notice that the power output increases non-linearly
247 with motror neuron recruitement, similiar to a human muscle.</p> 243 with motror neuron recruitement, similiar to a human muscle.</p>
248 </div> 244 </div>
249 #+end_html 245 #+end_html
250
251 246
252 ** Making the Worm Muscles Video 247 ** Making the Worm Muscles Video
253 #+name: magick7 248 #+name: magick7
254 #+begin_src clojure 249 #+begin_src clojure
255 (ns cortex.video.magick7 250 (ns cortex.video.magick7