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

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