login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for SandBox polymake revision 1 of 2

1 2
Editor:
Time: 2007/11/18 18:31:44 GMT-8
Note: links updated after rename

changed:
-
Here we demonstrate the PolyMake wrappers 'Polytope' and 'SimplicialComplex'.

To use the 'Polytope' domain we need to say

\begin{axiom}
)lib STRCNV READFILE POLYTOPE
\end{axiom}

To create a cube of dimension 4 and look at its h-vector, we say

\begin{axiom}
c5 := cube 5
h5 := hVector c5
\end{axiom}

The idea is to factor the h-polynomial, for example:
\begin{axiom}
factor reduce(+, [h5.(i+1) * t^i for i in 0..#h5-1])
\end{axiom}

Of course, the cube is simple:
\begin{axiom}
simple c5
\end{axiom}

Here are its vertices:
\begin{axiom}
vertices c5
\end{axiom}

Here is a random polytope with 6 vertices on the 3-dimensional sphere
\begin{axiom}
r5 := randSphere(3, 6)
\end{axiom}

Now 'vertices' spits out a matrix containing the coordinates of the vertices of the polytope:
\begin{axiom}
vertices r5
\end{axiom}

Here we demonstrate the PolyMake? wrappers Polytope and SimplicialComplex.

To use the Polytope domain we need to say

axiom
)lib STRCNV READFILE POLYTOPE
StringConversions is now explicitly exposed in frame initial StringConversions will be automatically loaded when needed from /var/zope2/var/LatexWiki/STRCNV.NRLIB/STRCNV ReadFile is now explicitly exposed in frame initial ReadFile will be automatically loaded when needed from /var/zope2/var/LatexWiki/READFILE.NRLIB/READFILE Polytope is now explicitly exposed in frame initial Polytope will be automatically loaded when needed from /var/zope2/var/LatexWiki/POLYTOPE.NRLIB/POLYTOPE

To create a cube of dimension 4 and look at its h-vector, we say

axiom
c5 := cube 5
>> System error: #<SB-SYS:FD-STREAM for "file /var/zope2/var/LatexWiki/POLYTOPE.NRLIB/POLYTOPE.fasl" {1005029651}> is a fasl file compiled with SBCL 1.0.31, and can't be loaded into SBCL 1.0.47.

The idea is to factor the h-polynomial, for example:

axiom
factor reduce(+, [h5.(i+1) * t^i for i in 0..#h5-1])
There are 2 exposed and 1 unexposed library operations named # having 1 argument(s) but none was determined to be applicable. Use HyperDoc Browse, or issue )display op # to learn more about the available operations. Perhaps package-calling the operation or using coercions on the arguments will allow you to apply the operation.
Cannot find a definition or applicable library operation named # with argument type(s) Variable(h5)
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.

Of course, the cube is simple:

axiom
simple c5
There are 1 exposed and 0 unexposed library operations named simple having 1 argument(s) but none was determined to be applicable. Use HyperDoc Browse, or issue )display op simple to learn more about the available operations. Perhaps package-calling the operation or using coercions on the arguments will allow you to apply the operation.
Cannot find a definition or applicable library operation named simple with argument type(s) Variable(c5)
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.

Here are its vertices:

axiom
vertices c5
There are 1 exposed and 0 unexposed library operations named vertices having 1 argument(s) but none was determined to be applicable. Use HyperDoc Browse, or issue )display op vertices to learn more about the available operations. Perhaps package-calling the operation or using coercions on the arguments will allow you to apply the operation.
Cannot find a definition or applicable library operation named vertices with argument type(s) Variable(c5)
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.

Here is a random polytope with 6 vertices on the 3-dimensional sphere

axiom
r5 := randSphere(3, 6)
>> System error: #<SB-SYS:FD-STREAM for "file /var/zope2/var/LatexWiki/POLYTOPE.NRLIB/POLYTOPE.fasl" {1005205331}> is a fasl file compiled with SBCL 1.0.31, and can't be loaded into SBCL 1.0.47.

Now vertices spits out a matrix containing the coordinates of the vertices of the polytope:

axiom
vertices r5
There are 1 exposed and 0 unexposed library operations named vertices having 1 argument(s) but none was determined to be applicable. Use HyperDoc Browse, or issue )display op vertices to learn more about the available operations. Perhaps package-calling the operation or using coercions on the arguments will allow you to apply the operation.
Cannot find a definition or applicable library operation named vertices with argument type(s) Variable(r5)
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.