{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "$p=new Polytope(POINTS=>[[1,0,0],[1,1,0],[1,0,1]]);"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1 0 0\n",
       "1 1 0\n",
       "1 0 1\n"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/html": [
       "<details><summary><pre style=\"display:inline\"><small>Click here for additional output</small></pre></summary>\n",
       "<pre>\n",
       "polymake: used package cdd\n",
       "  cddlib\n",
       "  Implementation of the double description method of Motzkin et al.\n",
       "  Copyright by Komei Fukuda.\n",
       "  http://www-oldurls.inf.ethz.ch/personal/fukudak/cdd_home/\n",
       "\n",
       "</pre>\n",
       "</details>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "print $p->VERTICES;"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1/2"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "print $p->VOLUME;"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3 3"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/html": [
       "<details><summary><pre style=\"display:inline\"><small>Click here for additional output</small></pre></summary>\n",
       "<pre>\n",
       "polymake: used package lrs\n",
       "  Implementation of the reverse search algorithm of Avis and Fukuda.\n",
       "  Copyright by David Avis.\n",
       "  http://cgm.cs.mcgill.ca/~avis/C/lrs.html\n",
       "\n",
       "</pre>\n",
       "</details>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "print $p->F_VECTOR;"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "application \"group\";"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "$g=new Group(PERMUTATION_ACTION=>new PermutationAction(GENERATORS=>[[1,0,2],[0,2,1]]));"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1 0 2\n",
       "0 2 1\n"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/html": [
       "<details><summary><pre style=\"display:inline\"><small>Click here for additional output</small></pre></summary>\n",
       "<pre>\n",
       "polymake: used package permlib\n",
       "  A callable C++ library for permutation computations. \n",
       "  Written by Thomas Rehn.\n",
       "  http://www.math.uni-rostock.de/~rehn/software/permlib.html \n",
       "\n",
       "</pre>\n",
       "</details>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "print $g->PERMUTATION_ACTION->STRONG_GENERATORS;"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "application \"polytope\";"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "$c=cube(3);"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.0//EN\" \"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd\">\n",
       "<svg height=\"841pt\" id=\"document\" viewBox=\"0 -615 575 615\" width=\"595pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
       "\t<title id=\"document_title\">c</title>\n",
       "\t<g>\n",
       "\t\t<polygon points=\"35,-578.5 35,-53.5 560,-53.5 560,-578.5 \" style=\"fill: rgb(119,236,158); fill-opacity: 1; stroke: rgb(0,0,0); stroke-width: 1\" />\n",
       "\t</g>\n",
       "\t<g />\n",
       "\t<g>\n",
       "\t\t<polygon points=\"35,-53.5 35,-53.5 35,-578.5 35,-578.5 \" style=\"fill: rgb(119,236,158); fill-opacity: 1; stroke: rgb(0,0,0); stroke-width: 1\" />\n",
       "\t\t<polygon points=\"560,-578.5 560,-53.5 560,-53.5 560,-578.5 \" style=\"fill: rgb(119,236,158); fill-opacity: 1; stroke: rgb(0,0,0); stroke-width: 1\" />\n",
       "\t\t<polygon points=\"560,-53.5 35,-53.5 35,-53.5 560,-53.5 \" style=\"fill: rgb(119,236,158); fill-opacity: 1; stroke: rgb(0,0,0); stroke-width: 1\" />\n",
       "\t\t<polygon points=\"35,-578.5 35,-578.5 560,-578.5 560,-578.5 \" style=\"fill: rgb(119,236,158); fill-opacity: 1; stroke: rgb(0,0,0); stroke-width: 1\" />\n",
       "\t\t<polygon points=\"35,-53.5 35,-578.5 560,-578.5 560,-53.5 \" style=\"fill: rgb(119,236,158); fill-opacity: 1; stroke: rgb(0,0,0); stroke-width: 1\" />\n",
       "\t</g>\n",
       "\t<g>\n",
       "\t\t<circle cx=\"35\" cy=\"-53.5\" r=\"2\" style=\"fill: rgb(255,0,0)\" />\n",
       "\t\t<text font-family=\"Times-Roman\" font-size=\"10\" text-anchor=\"middle\" x=\"35\" y=\"-58.5\">0</text>\n",
       "\t\t<circle cx=\"560\" cy=\"-53.5\" r=\"2\" style=\"fill: rgb(255,0,0)\" />\n",
       "\t\t<text font-family=\"Times-Roman\" font-size=\"10\" text-anchor=\"middle\" x=\"560\" y=\"-58.5\">1</text>\n",
       "\t\t<circle cx=\"35\" cy=\"-578.5\" r=\"2\" style=\"fill: rgb(255,0,0)\" />\n",
       "\t\t<text font-family=\"Times-Roman\" font-size=\"10\" text-anchor=\"middle\" x=\"35\" y=\"-583.5\">2</text>\n",
       "\t\t<circle cx=\"560\" cy=\"-578.5\" r=\"2\" style=\"fill: rgb(255,0,0)\" />\n",
       "\t\t<text font-family=\"Times-Roman\" font-size=\"10\" text-anchor=\"middle\" x=\"560\" y=\"-583.5\">3</text>\n",
       "\t\t<circle cx=\"35\" cy=\"-53.5\" r=\"2\" style=\"fill: rgb(255,0,0)\" />\n",
       "\t\t<text font-family=\"Times-Roman\" font-size=\"10\" text-anchor=\"middle\" x=\"35\" y=\"-58.5\">4</text>\n",
       "\t\t<circle cx=\"560\" cy=\"-53.5\" r=\"2\" style=\"fill: rgb(255,0,0)\" />\n",
       "\t\t<text font-family=\"Times-Roman\" font-size=\"10\" text-anchor=\"middle\" x=\"560\" y=\"-58.5\">5</text>\n",
       "\t\t<circle cx=\"35\" cy=\"-578.5\" r=\"2\" style=\"fill: rgb(255,0,0)\" />\n",
       "\t\t<text font-family=\"Times-Roman\" font-size=\"10\" text-anchor=\"middle\" x=\"35\" y=\"-583.5\">6</text>\n",
       "\t\t<circle cx=\"560\" cy=\"-578.5\" r=\"2\" style=\"fill: rgb(255,0,0)\" />\n",
       "\t\t<text font-family=\"Times-Roman\" font-size=\"10\" text-anchor=\"middle\" x=\"560\" y=\"-583.5\">7</text>\n",
       "\t</g>\n",
       "\t<!-- \n",
       "\tGenerated using the Perl SVG Module V2.78\n",
       "\tby Ronan Oger\n",
       "\tInfo: http://www.roitsystems.com/\n",
       " -->\n",
       "</svg"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<details><summary><pre style=\"display:inline\"><small>Click here for additional output</small></pre></summary>\n",
       "<pre>\n",
       "polymake: used package SVG\n",
       "   Generated using the Perl SVG Module\n",
       "   by Ronan Oger\n",
       "\n",
       "</pre>\n",
       "</details>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "$c->VISUAL;"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "$d=cube(3);"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.0//EN\" \"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd\">\n",
       "<svg height=\"841pt\" id=\"document\" viewBox=\"0 -615 575 615\" width=\"595pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
       "\t<title id=\"document_title\">d</title>\n",
       "\t<g>\n",
       "\t\t<polygon points=\"35,-578.5 35,-53.5 560,-53.5 560,-578.5 \" style=\"fill: rgb(119,236,158); fill-opacity: 1; stroke: rgb(0,0,0); stroke-width: 1\" />\n",
       "\t</g>\n",
       "\t<g />\n",
       "\t<g>\n",
       "\t\t<polygon points=\"35,-53.5 35,-53.5 35,-578.5 35,-578.5 \" style=\"fill: rgb(119,236,158); fill-opacity: 1; stroke: rgb(0,0,0); stroke-width: 1\" />\n",
       "\t\t<polygon points=\"560,-578.5 560,-53.5 560,-53.5 560,-578.5 \" style=\"fill: rgb(119,236,158); fill-opacity: 1; stroke: rgb(0,0,0); stroke-width: 1\" />\n",
       "\t\t<polygon points=\"560,-53.5 35,-53.5 35,-53.5 560,-53.5 \" style=\"fill: rgb(119,236,158); fill-opacity: 1; stroke: rgb(0,0,0); stroke-width: 1\" />\n",
       "\t\t<polygon points=\"35,-578.5 35,-578.5 560,-578.5 560,-578.5 \" style=\"fill: rgb(119,236,158); fill-opacity: 1; stroke: rgb(0,0,0); stroke-width: 1\" />\n",
       "\t\t<polygon points=\"35,-53.5 35,-578.5 560,-578.5 560,-53.5 \" style=\"fill: rgb(119,236,158); fill-opacity: 1; stroke: rgb(0,0,0); stroke-width: 1\" />\n",
       "\t</g>\n",
       "\t<g>\n",
       "\t\t<circle cx=\"35\" cy=\"-53.5\" r=\"2\" style=\"fill: rgb(255,0,0)\" />\n",
       "\t\t<text font-family=\"Times-Roman\" font-size=\"10\" text-anchor=\"middle\" x=\"35\" y=\"-58.5\">0</text>\n",
       "\t\t<circle cx=\"560\" cy=\"-53.5\" r=\"2\" style=\"fill: rgb(255,0,0)\" />\n",
       "\t\t<text font-family=\"Times-Roman\" font-size=\"10\" text-anchor=\"middle\" x=\"560\" y=\"-58.5\">1</text>\n",
       "\t\t<circle cx=\"35\" cy=\"-578.5\" r=\"2\" style=\"fill: rgb(255,0,0)\" />\n",
       "\t\t<text font-family=\"Times-Roman\" font-size=\"10\" text-anchor=\"middle\" x=\"35\" y=\"-583.5\">2</text>\n",
       "\t\t<circle cx=\"560\" cy=\"-578.5\" r=\"2\" style=\"fill: rgb(255,0,0)\" />\n",
       "\t\t<text font-family=\"Times-Roman\" font-size=\"10\" text-anchor=\"middle\" x=\"560\" y=\"-583.5\">3</text>\n",
       "\t\t<circle cx=\"35\" cy=\"-53.5\" r=\"2\" style=\"fill: rgb(255,0,0)\" />\n",
       "\t\t<text font-family=\"Times-Roman\" font-size=\"10\" text-anchor=\"middle\" x=\"35\" y=\"-58.5\">4</text>\n",
       "\t\t<circle cx=\"560\" cy=\"-53.5\" r=\"2\" style=\"fill: rgb(255,0,0)\" />\n",
       "\t\t<text font-family=\"Times-Roman\" font-size=\"10\" text-anchor=\"middle\" x=\"560\" y=\"-58.5\">5</text>\n",
       "\t\t<circle cx=\"35\" cy=\"-578.5\" r=\"2\" style=\"fill: rgb(255,0,0)\" />\n",
       "\t\t<text font-family=\"Times-Roman\" font-size=\"10\" text-anchor=\"middle\" x=\"35\" y=\"-583.5\">6</text>\n",
       "\t\t<circle cx=\"560\" cy=\"-578.5\" r=\"2\" style=\"fill: rgb(255,0,0)\" />\n",
       "\t\t<text font-family=\"Times-Roman\" font-size=\"10\" text-anchor=\"middle\" x=\"560\" y=\"-583.5\">7</text>\n",
       "\t</g>\n",
       "\t<!-- \n",
       "\tGenerated using the Perl SVG Module V2.78\n",
       "\tby Ronan Oger\n",
       "\tInfo: http://www.roitsystems.com/\n",
       " -->\n",
       "</svg"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "$d->VISUAL;"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "polymake",
   "language": "polymake",
   "name": "polymake"
  },
  "language_info": {
   "codemirror_mode": "perl",
   "file_extension": ".pl",
   "mimetype": "text/x-polymake",
   "name": "polymake"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
