PageRenderTime 34ms CodeModel.GetById 1ms app.highlight 27ms RepoModel.GetById 1ms app.codeStats 1ms

/unmaintained/4DNav/4DNav-docs.factor

http://github.com/abeaumont/factor
Unknown | 201 lines | 169 code | 32 blank | 0 comment | 0 complexity | 3390c2aedaa3aa0a2cd4dfef5ac4b794 MD5 | raw file
  1! Copyright (C) 2008 Jean-Fran├žois Bigot.
  2! See http://factorcode.org/license.txt for BSD license.
  3USING: help.markup help.syntax kernel quotations strings ;
  4IN: 4DNav
  5
  6
  7HELP: menu-3D
  8{ $values
  9     { "gadget" "gadget" }
 10}
 11{ $description "The menu dedicated to 3D movements of the camera" } ;
 12
 13HELP: menu-4D
 14{ $values
 15    
 16     { "gadget" "gadget" }
 17}
 18{ $description "The menu dedicated to 4D movements of space" } ;
 19
 20HELP: menu-bar
 21{ $values
 22    
 23     { "gadget" "gadget" }
 24}
 25{ $description "return gadget containing menu buttons" } ;
 26
 27HELP: model-projection
 28{ $values
 29     { "x" "interger" }
 30     { "space" "space" }
 31}
 32{ $description "Project space following coordinate x" } ;
 33
 34HELP: mvt-3D-1
 35{ $values
 36    
 37     { "quot" "quotation" }
 38}
 39{ $description "return a quotation to orientate space to see it from first point of view" } ;
 40
 41HELP: mvt-3D-2
 42{ $values
 43    
 44     { "quot" "quotation" }
 45}
 46{ $description "return a quotation to orientate space to see it from second point of view" } ;
 47
 48HELP: mvt-3D-3
 49{ $values
 50    
 51     { "quot" "quotation" }
 52}
 53{ $description "return a quotation to orientate space to see it from third point of view" } ;
 54
 55HELP: mvt-3D-4
 56{ $values
 57    
 58     { "quot" "quotation" }
 59}
 60{ $description "return a quotation to orientate space to see it from first point of view" } ;
 61
 62HELP: load-model-file
 63{ $description "load space from file" } ;
 64
 65HELP: rotation-4D
 66{ $values
 67     { "m" "a rotation matrix" }
 68}
 69{ $description "Apply a 4D rotation matrix" } ;
 70
 71HELP: translation-4D
 72{ $values
 73     { "v" "vector" }
 74}
 75{ $description "Apply a 4D translation" } ;
 76
 77
 78ARTICLE: "implementation details" "How 4DNav is done"
 79"4DNav is build using :"
 80
 81{ $subsections
 82    "4DNav.camera"
 83    "adsoda-main-page"
 84}
 85;
 86
 87ARTICLE: "Space file" "Create a new space file"
 88"To build a new space, create an XML file using " { $vocab-link "adsoda" } " model description. A solid is not caracterized by its corners but is defined as the intersection of hyperplanes."
 89
 90$nl
 91"An example is:"
 92{ $code """
 93<model>
 94<space>
 95 <dimension>4</dimension>
 96 <solid>
 97     <name>4cube1</name>
 98     <dimension>4</dimension>
 99     <face>1,0,0,0,100</face>
100     <face>-1,0,0,0,-150</face>
101     <face>0,1,0,0,100</face>
102     <face>0,-1,0,0,-150</face>
103     <face>0,0,1,0,100</face>
104     <face>0,0,-1,0,-150</face>
105     <face>0,0,0,1,100</face>
106     <face>0,0,0,-1,-150</face>
107     <color>1,0,0</color>
108 </solid>
109 <solid>
110     <name>4triancube</name>
111     <dimension>4</dimension>
112     <face>1,0,0,0,160</face>
113     <face>-0.4999999999999998,-0.8660254037844387,0,0,-130</face>
114     <face>-0.5000000000000004,0.8660254037844384,0,0,-130</face>
115     <face>0,0,1,0,140</face>
116     <face>0,0,-1,0,-180</face>
117     <face>0,0,0,1,110</face>
118     <face>0,0,0,-1,-180</face>
119     <color>0,1,0</color>
120 </solid>
121 <solid>
122     <name>triangone</name>
123     <dimension>4</dimension>
124     <face>1,0,0,0,60</face>
125     <face>0.5,0.8660254037844386,0,0,60</face>
126     <face>-0.5,0.8660254037844387,0,0,-20</face>
127     <face>-1.0,0,0,0,-100</face>
128     <face>-0.5,-0.8660254037844384,0,0,-100</face>
129     <face>0.5,-0.8660254037844387,0,0,-20</face>
130     <face>0,0,1,0,120</face>
131     <face>0,0,-0.4999999999999998,-0.8660254037844387,-120</face>
132     <face>0,0,-0.5000000000000004,0.8660254037844384,-120</face>
133     <color>0,1,1</color>
134 </solid>
135 <light>
136     <direction>1,1,1,1</direction>
137     <color>0.2,0.2,0.6</color>
138 </light>
139 <color>0.8,0.9,0.9</color>
140</space>
141</model>""" } ;
142
143ARTICLE: "TODO" "Todo"
144{ $list 
145    "A vocab to initialize parameters"
146    "an editor mode" 
147        { $list "add a face to a solid"
148                "add a solid to the space"
149                "move a face"
150                "move a solid"
151                "select a solid in a list"
152                "select a face"
153                "display selected face"
154                "edit a solid color"
155                "add a light"
156                "edit a light color"
157                "move a light"
158                }
159    "add a tool wich give an hyperplane normal vector with enought points. Will use adsoda.intersect-hyperplanes with { { 0 } { 0 } { 1 } } "
160    "decorrelate 3D camera and activate them with select buttons"
161
162} ;
163
164
165ARTICLE: "4DNav" "The 4DNav app"
166{ $vocab-link "4DNav" }
167$nl
168{ $heading "4D Navigator" }
169"4DNav is a simple tool to visualize 4 dimensionnal objects."
170$nl
171"It uses " { $vocab-link "adsoda" } " library to display a 4D space and navigate thru it."
172$nl
173"It will display:"
174{ $list
175    { "a menu window" }
176    {  "4 visualization windows" }
177}
178"Each visualization window represents the projection of the 4D space on a particular 3D space."
179
180{ $heading "Start" }
181"type:" { $code "\"4DNav\" run" } 
182
183{ $heading "Navigation" }
184"Menu window is divided in 4 areas"
185{ $list
186    { "a space-file chooser to select the file to display" }
187    { "a parametrization area to select the projection mode" }
188    { "4D submenu to translate and rotate the 4D space" }
189    { "3D submenu to move the camera in 3D space. Cameras in every 3D spaces are manipulated as a single one" }
190    }
191
192{ $heading "Links" }
193{ $subsections
194    "Space file"
195    "TODO"
196    "implementation details"
197}
198
199;
200
201ABOUT: "4DNav"