http://github.com/abeaumont/factor
Unknown | 62 lines | 51 code | 11 blank | 0 comment | 0 complexity | adae995d275e3c5519093f54cc0d9b79 MD5 | raw file
``` 1! Copyright (C) 2008 Jeff Bigot.
3USING: arrays help.markup help.syntax kernel sequences ;
5
6HELP: 3cube
7{ \$values
8    { "array" "array" } { "name" "name" }
9    { "solid" "solid" }
10}
11{ \$description "array : xmin xmax ymin ymax zmin zmax"
12"returns a 3D solid with given limits"
13} ;
14
15HELP: 4cube
16{ \$values
17    { "array" "array" } { "name" "name" }
18    { "solid" "solid" }
19}
20{ \$description "array : xmin xmax ymin ymax zmin zmax wmin wmax"
21"returns a 4D solid with given limits"
22} ;
23
24
25HELP: equation-system-for-normal
26{ \$values
27     { "points" "a list of n points" }
28     { "matrix" "matrix" }
29}
30{ \$description "From a list of points, return the matrix"
31"to solve in order to find the vector normal to the plan defined by the points" }
32;
33
34HELP: normal-vector
35{ \$values
36     { "points" "a list of n points" }
37     { "v" "a vector" }
38}
39{ \$description "From a list of points, returns the vector normal to the plan defined by the points"
40"With n points, creates n-1 vectors and then find a vector orthogonal to every others"
41"returns { f } if a normal vector can not be found" }
42;
43
44HELP: points-to-hyperplane
45{ \$values
46     { "points" "a list of n points" }
47     { "hyperplane" "an hyperplane equation" }
48}
49{ \$description "From a list of points, returns the equation of the hyperplan"
50"Finds a normal vector and then translate it so that it includes one of the points"
51
52}
53;
54