{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "Two rectangles. Their joint convex hull is an octagon. This octagon arises as the projection of a distorted cube (use your imagination). Moreover, that octagon has the same 0-skeleton as the 3-cube, i.e., it also has 8 vertices." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", "\n", " \n", " QxR\n", " \n", " \n", "\n", "\n", "\n", "\t\t
\n", "\t\t\t
\n", "\t\t\t\tExplode\n", "\t\t\t\t\n", "\t\t\t\t
Automatic explosion
\n", "\t\t\t\t
Exploding speed
\n", "\t\t\t\t\n", "\t\t\t
\n", "\n", "\t\t\t\n", "\t\t\t
\n", "\t\t\t\tTransparency\n", "\t\t\t\t\n", "\t\t\t
\n", "\t\t\t\n", "\t\t\t
\n", "\t\t\t\tRotation\n", "\t\t\t\t
\n", "\t\t\t\t\t
x-axis
\n", "\t\t\t\t\t
y-axis
\n", "\t\t\t\t\t
z-axis
\n", "\t\t\t\t\t\n", "\t\t\t\t
\n", "\n", "\t\t\t\t
Rotation speed
\n", "\t\t\t\t\n", "\n", "\t\t\t
\n", "\n", "\n", "\t\t\t
\n", "\t\t\t\tDisplay\n", "\t\t\t\t
\n", "\t\t\t\t\t
\n", "\t\t\t\t\t
Labels
\n", "\t\t\t\t
\n", "\t\t\t
\n", "\n", "\n", "\t\t\t
\n", "\t\t\t\tSVG\n", "\t\t\t\t
\n", "\t\t\t\t\t
\n", "\t\t\t\t\t\t Download
\n", "\t\t\t\t\t\t New tab
\n", "\t\t\t\t\t
\n", "\t\t\t\t\t\n", "\t\t\t\t
\n", "\t\t\t
\n", "\n", "\t\t
\t\n", "\t\t\n", "\t\t\n", "
\n", "\n", "\n", "\n", "\n", "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Click here for additional output
\n", "
\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",
       "polymake: used package threejs\n",
       "   Three.js is a lightweight cross-browser JavaScript library/API used to create and display animated 3D computer graphics on a Web browser.\n",
       "   See http://github.com/mrdoob for the source code.\n",
       "\n",
       "
\n", "
\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "$Q=cube(1);\n", "$R=cube(1,2);\n", "$QxR=product($Q,$R);\n", "$RxQ=product($R,$Q);\n", "compose($QxR->VISUAL,$RxQ->VISUAL);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now we do the same with two 4-cubes, each of which has two short and two long edge directions." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "$Q=cube(2);\n", "$R=cube(2,2);\n", "$QxR=product($Q,$R);\n", "$RxQ=product($R,$Q);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The resulting joint convex hull (i.e., the higher-dimensional version of the octagon above) is a cubical 4-polytope which has the same vertex-edge graph as the 5-cube." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "true" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" }, { "data": { "text/html": [ "
Click here for additional output
\n", "
\n",
       "polymake: used package bliss\n",
       "  Computation of automorphism groups of graphs.\n",
       "  Copyright by Tommi Junttila and Petteri Kaski.\n",
       "  http://www.tcs.hut.fi/Software/bliss/\n",
       "
\n", "
\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "$C=conv($QxR,$RxQ);\n", "print isomorphic($C->GRAPH->ADJACENCY, cube(5)->GRAPH->ADJACENCY);" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", "\n", " \n", " Schlegel diagram of C on facet 0\n", " \n", " \n", "\n", "\n", "\n", "\t\t
\n", "\t\t\t
\n", "\t\t\t\tTransparency\n", "\t\t\t\t\n", "\t\t\t
\n", "\t\t\t\n", "\t\t\t
\n", "\t\t\t\tRotation\n", "\t\t\t\t
\n", "\t\t\t\t\t
x-axis
\n", "\t\t\t\t\t
y-axis
\n", "\t\t\t\t\t
z-axis
\n", "\t\t\t\t\t\n", "\t\t\t\t
\n", "\n", "\t\t\t\t
Rotation speed
\n", "\t\t\t\t\n", "\n", "\t\t\t
\n", "\n", "\n", "\t\t\t
\n", "\t\t\t\tDisplay\n", "\t\t\t\t
\n", "\t\t\t\t\t
\n", "\t\t\t\t\t
Labels
\n", "\t\t\t\t
\n", "\t\t\t
\n", "\n", "\n", "\t\t\t
\n", "\t\t\t\tSVG\n", "\t\t\t\t
\n", "\t\t\t\t\t
\n", "\t\t\t\t\t\t Download
\n", "\t\t\t\t\t\t New tab
\n", "\t\t\t\t\t
\n", "\t\t\t\t\t\n", "\t\t\t\t
\n", "\t\t\t
\n", "\n", "\t\t
\t\n", "\t\t\n", "\t\t\n", "
\n", "\n", "\n", "\n", "\n", "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Click here for additional output
\n", "
\n",
       "polymake: used package tikz\n",
       "  TikZ, a graphical toolkit for LaTeX.\n",
       "  http://pgf.sourceforge.net.\n",
       "\n",
       "
\n", "
\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "$C->VISUAL(VertexLabels=>\"hidden\",VertexThickness=>3.0,EdgeColor=>\"blue\",EdgeThickness=>2);\n", "tikz($C->VISUAL(VertexLabels=>\"hidden\",VertexThickness=>2.0,EdgeColor=>\"blue\",EdgeThickness=>1));" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Schlegel diagrams can be used to visualize d-polytopes in dimension d-1. Here is how the 2-dimensional Schlegel diagram of a 3-polytope is constructed." ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", "\n", " \n", " Schlegel diagram of on facet 1\n", " \n", " \n", "\n", "\n", "\n", "\t\t
\n", "\t\t\t
\n", "\t\t\t\tExplode\n", "\t\t\t\t\n", "\t\t\t\t
Automatic explosion
\n", "\t\t\t\t
Exploding speed
\n", "\t\t\t\t\n", "\t\t\t
\n", "\n", "\t\t\t\n", "\t\t\t
\n", "\t\t\t\tTransparency\n", "\t\t\t\t\n", "\t\t\t
\n", "\t\t\t\n", "\t\t\t
\n", "\t\t\t\tRotation\n", "\t\t\t\t
\n", "\t\t\t\t\t
x-axis
\n", "\t\t\t\t\t
y-axis
\n", "\t\t\t\t\t
z-axis
\n", "\t\t\t\t\t\n", "\t\t\t\t
\n", "\n", "\t\t\t\t
Rotation speed
\n", "\t\t\t\t\n", "\n", "\t\t\t
\n", "\n", "\n", "\t\t\t
\n", "\t\t\t\tDisplay\n", "\t\t\t\t
\n", "\t\t\t\t\t
\n", "\t\t\t\t\t
Labels
\n", "\t\t\t\t
\n", "\t\t\t
\n", "\n", "\n", "\t\t\t
\n", "\t\t\t\tSVG\n", "\t\t\t\t
\n", "\t\t\t\t\t
\n", "\t\t\t\t\t\t Download
\n", "\t\t\t\t\t\t New tab
\n", "\t\t\t\t\t
\n", "\t\t\t\t\t\n", "\t\t\t\t
\n", "\t\t\t
\n", "\n", "\t\t
\t\n", "\t\t\n", "\t\t\n", "
\n", "\n", "\n", "\n", "\n", "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "prism(n_gon(7))->SCHLEGEL(FACET=>1)->CONSTRUCTION;" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "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": 2 }