Mercurial > cortex
comparison org/touch.org @ 255:e6e0bb3057b2
minor edits
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Mon, 13 Feb 2012 23:44:15 -0700 |
parents | 91654978c8e0 |
children | c39b8b29a79e |
comparison
equal
deleted
inserted
replaced
254:91654978c8e0 | 255:e6e0bb3057b2 |
---|---|
120 (defn ->triangle [points] | 120 (defn ->triangle [points] |
121 (apply #(Triangle. %1 %2 %3) (map ->vector3f points))) | 121 (apply #(Triangle. %1 %2 %3) (map ->vector3f points))) |
122 #+end_src | 122 #+end_src |
123 | 123 |
124 It is convienent to treat a =Triangle= as a vector of vectors, and a | 124 It is convienent to treat a =Triangle= as a vector of vectors, and a |
125 =Vector2f= and =Vector3f= as vectors of floats. (->vector3f) and | 125 =Vector2f= or =Vector3f= as vectors of floats. (->vector3f) and |
126 (->triangle) undo the operations of =(vector3f-seq)= and | 126 (->triangle) undo the operations of =(vector3f-seq)= and |
127 =(triangle-seq)=. If these classes implemented =Iterable= then =(seq)= | 127 =(triangle-seq)=. If these classes implemented =Iterable= then =(seq)= |
128 would work on them automitacally. | 128 would work on them automitacally. |
129 | 129 |
130 ** Decomposing a 3D shape into Triangles | 130 ** Decomposing a 3D shape into Triangles |
740 feature so prominently in our lives. But humans have far more than the | 740 feature so prominently in our lives. But humans have far more than the |
741 five main senses. There are internal chemical senses, pain (which is | 741 five main senses. There are internal chemical senses, pain (which is |
742 *not* the same as touch), heat sensitivity, and our sense of balance, | 742 *not* the same as touch), heat sensitivity, and our sense of balance, |
743 among others. One extra sense is so important that I must implement it | 743 among others. One extra sense is so important that I must implement it |
744 to have a hope of making creatures that can gracefully control their | 744 to have a hope of making creatures that can gracefully control their |
745 own bodies. It is Proprioception which is the sense of the location | 745 own bodies. It is Proprioception, which is the sense of the location |
746 of each body part in relation to the other body parts. | 746 of each body part in relation to the other body parts. |
747 | 747 |
748 Close your eyes, and touch your nose with your right index finger. How | 748 Close your eyes, and touch your nose with your right index finger. How |
749 did you do it? You could not see your hand, and neither your hand nor | 749 did you do it? You could not see your hand, and neither your hand nor |
750 your nose could use the sense of touch to guide the path of your hand. | 750 your nose could use the sense of touch to guide the path of your hand. |