Mercurial > cortex
changeset 201:1c915cc1118b
minor edits for sense.org
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Tue, 07 Feb 2012 07:13:45 -0700 |
parents | 7eb966144dad |
children | d5c597a7aed4 |
files | org/sense.org |
diffstat | 1 files changed, 16 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
1.1 --- a/org/sense.org Mon Feb 06 08:26:20 2012 -0700 1.2 +++ b/org/sense.org Tue Feb 07 07:13:45 2012 -0700 1.3 @@ -75,11 +75,11 @@ 1.4 1.5 Blender and jMonkeyEngine already have support for exactly this sort 1.6 of data structure because it is used to "skin" models for games. It is 1.7 -called [[http://wiki.blender.org/index.php/Doc:2.6/Manual/Textures/Mapping/UV][UV-mapping]]. The three-dimensional surface is cut and smooshed 1.8 -until it fits on a two-dimensional image. You paint whatever you want 1.9 -on that image, and when the three-dimensional shape is rendered in a 1.10 -game that image the smooshing and cutting us reversed and the image 1.11 -appears on the three-dimensional object. 1.12 +called [[http://wiki.blender.org/index.php/Doc:2.6/Manual/Textures/Mapping/UV][UV-mapping]]. The three-dimensional surface of a model is cut 1.13 +and smooshed until it fits on a two-dimensional image. You paint 1.14 +whatever you want on that image, and when the three-dimensional shape 1.15 +is rendered in a game the smooshing and cutting us reversed and the 1.16 +image appears on the three-dimensional object. 1.17 1.18 To make a sense, interpret the UV-image as describing the distribution 1.19 of that senses sensors. To get different types of sensors, you can 1.20 @@ -111,7 +111,7 @@ 1.21 pixels so that they can be used to create senses. =(load-image)= finds 1.22 images using jMonkeyEngine's asset-manager, so the image path is 1.23 expected to be relative to the =assets= directory. Thanks to Dylan 1.24 -for the beautiful version of filter-pixels. 1.25 +for the beautiful version of =(filter-pixels)=. 1.26 1.27 #+name: topology-1 1.28 #+begin_src clojure 1.29 @@ -352,7 +352,8 @@ 1.30 (do (println-repl "could not find" parent-name "node") [])))) 1.31 1.32 (defn closest-node 1.33 - "Return the node in creature which is closest to the given node." 1.34 + "Return the physical node in creature which is closest to the given 1.35 + node." 1.36 [#^Node creature #^Node empty] 1.37 (loop [radius (float 0.01)] 1.38 (let [results (CollisionResults.)] 1.39 @@ -425,24 +426,23 @@ 1.40 (com.aurellem.capture RatchetTimer Capture))) 1.41 1.42 (defn test-bind-sense 1.43 - "Show a camera that stays in the same relative position to a blue cube." 1.44 + "Show a camera that stays in the same relative position to a blue 1.45 + cube." 1.46 [] 1.47 - (let [camera-pos (Vector3f. 0 30 0) 1.48 + (let [eye-pos (Vector3f. 0 30 0) 1.49 rock (box 1 1 1 :color ColorRGBA/Blue 1.50 :position (Vector3f. 0 10 0) 1.51 :mass 30) 1.52 - rot (.getWorldRotation rock) 1.53 table (box 3 1 10 :color ColorRGBA/Gray :mass 0 1.54 :position (Vector3f. 0 -3 0))] 1.55 (world 1.56 (nodify [rock table]) 1.57 standard-debug-controls 1.58 - (fn [world] 1.59 - (let 1.60 - [cam (doto (.clone (.getCamera world)) 1.61 - (.setLocation camera-pos) 1.62 - (.lookAt Vector3f/ZERO 1.63 - Vector3f/UNIT_X))] 1.64 + (fn init [world] 1.65 + (let [cam (doto (.clone (.getCamera world)) 1.66 + (.setLocation eye-pos) 1.67 + (.lookAt Vector3f/ZERO 1.68 + Vector3f/UNIT_X))] 1.69 (bind-sense rock cam) 1.70 (.setTimer world (RatchetTimer. 60)) 1.71 (Capture/captureVideo