comparison org/proprioception.org @ 460:763d13f77e03

merge in laptop changes.
author Robert McIntyre <rlm@mit.edu>
date Thu, 27 Mar 2014 17:57:01 -0400
parents 5205535237fb
children
comparison
equal deleted inserted replaced
459:a86555b02916 460:763d13f77e03
50 (defn right-handed? 50 (defn right-handed?
51 "true iff the three vectors form a right handed coordinate 51 "true iff the three vectors form a right handed coordinate
52 system. The three vectors do not have to be normalized or 52 system. The three vectors do not have to be normalized or
53 orthogonal." 53 orthogonal."
54 [vec1 vec2 vec3] 54 [vec1 vec2 vec3]
55 (< 0 (.dot (.cross vec1 vec2) vec3))) 55 (pos? (.dot (.cross vec1 vec2) vec3)))
56 56
57 (defn absolute-angle 57 (defn absolute-angle
58 "The angle between 'vec1 and 'vec2 around 'axis. In the range 58 "The angle between 'vec1 and 'vec2 around 'axis. In the range
59 [0 (* 2 Math/PI)]." 59 [0 (* 2 Math/PI)]."
60 [vec1 vec2 axis] 60 [vec1 vec2 axis]
326 (defn combine-images [] 326 (defn combine-images []
327 (let [main-view (pics "main-view") 327 (let [main-view (pics "main-view")
328 proprioception (pics "proprio/0") 328 proprioception (pics "proprio/0")
329 targets (map 329 targets (map
330 #(File. (str base "out/" (format "%07d.png" %))) 330 #(File. (str base "out/" (format "%07d.png" %)))
331 (range 0 (count main-view)))] 331 (range (count main-view)))]
332 (dorun 332 (dorun
333 (pmap 333 (pmap
334 (comp 334 (comp
335 (fn [[ main-view proprioception target]] 335 (fn [[ main-view proprioception target]]
336 (println target) 336 (println target)
383 #+html: <ul> <li> <a href="../org/proprioception.org">This org file</a> </li> </ul> 383 #+html: <ul> <li> <a href="../org/proprioception.org">This org file</a> </li> </ul>
384 - [[http://hg.bortreb.com ][source-repository]] 384 - [[http://hg.bortreb.com ][source-repository]]
385 385
386 * Next 386 * Next
387 387
388 Next time, I'll give the Worm the power to [[./movement.org][move on it's own]]. 388 Next time, I'll give the Worm the power to [[./movement.org][move on its own]].
389 389
390 390
391 * COMMENT generate source 391 * COMMENT generate source
392 #+begin_src clojure :tangle ../src/cortex/proprioception.clj 392 #+begin_src clojure :tangle ../src/cortex/proprioception.clj
393 <<proprioception-header>> 393 <<proprioception-header>>