/unmaintained/adsoda/tools/tools-docs.factor

http://github.com/abeaumont/factor · Factor · 62 lines · 49 code · 11 blank · 2 comment · 1 complexity · adae995d275e3c5519093f54cc0d9b79 MD5 · raw file

  1. ! Copyright (C) 2008 Jeff Bigot.
  2. ! See http://factorcode.org/license.txt for BSD license.
  3. USING: arrays help.markup help.syntax kernel sequences ;
  4. IN: adsoda.tools
  5. HELP: 3cube
  6. { $values
  7. { "array" "array" } { "name" "name" }
  8. { "solid" "solid" }
  9. }
  10. { $description "array : xmin xmax ymin ymax zmin zmax"
  11. "returns a 3D solid with given limits"
  12. } ;
  13. HELP: 4cube
  14. { $values
  15. { "array" "array" } { "name" "name" }
  16. { "solid" "solid" }
  17. }
  18. { $description "array : xmin xmax ymin ymax zmin zmax wmin wmax"
  19. "returns a 4D solid with given limits"
  20. } ;
  21. HELP: equation-system-for-normal
  22. { $values
  23. { "points" "a list of n points" }
  24. { "matrix" "matrix" }
  25. }
  26. { $description "From a list of points, return the matrix"
  27. "to solve in order to find the vector normal to the plan defined by the points" }
  28. ;
  29. HELP: normal-vector
  30. { $values
  31. { "points" "a list of n points" }
  32. { "v" "a vector" }
  33. }
  34. { $description "From a list of points, returns the vector normal to the plan defined by the points"
  35. "With n points, creates n-1 vectors and then find a vector orthogonal to every others"
  36. "returns { f } if a normal vector can not be found" }
  37. ;
  38. HELP: points-to-hyperplane
  39. { $values
  40. { "points" "a list of n points" }
  41. { "hyperplane" "an hyperplane equation" }
  42. }
  43. { $description "From a list of points, returns the equation of the hyperplan"
  44. "Finds a normal vector and then translate it so that it includes one of the points"
  45. }
  46. ;
  47. ARTICLE: "adsoda.tools" "Tools"
  48. { $vocab-link "adsoda.tools" }
  49. "Tools to help in building an " { $vocab-link "adsoda" } "-space"
  50. ;
  51. ABOUT: "adsoda.tools"