I could need your help with constructing half-integer polytopes.
I am generating all 2, 3 and 4 dimensional polytopes whose vertices are element of {0,1/2,1}.
I already constructed a tarball with polytopes of all possible options combining 0, ½ and 1 for dimension 2, 3 and 4. I´ll attach the tarball for reference.
For my further work only the non-isomorphic polytopes are requested.
That means: If polytope x is a mirrored and/or rotated and/or displaced version of polytope y, then it is equal to polytope y, and polytope x is not needed and can be deleted. E.g. the two polytopes in vertices ([1,0,0],[1,1/2,0],[1,0,1/2]) and ([1,1,1][1,1,1/2][1,1/2,1]) are the same and only one of those two is needed.
In polymake I tried to eliminate all polytopes that have the same number of vertices, the same volume and return 1 at the isomorphic test. But even in dimension 2 not all possibilities were found.
Code: Select all
script("tarballs");
@a=unpack_tarball("zweidim_polytope.tgz");
$count=0;
@f = ();
@g = ();
for ($i=0; $i<466; ++$i){
if ($a[$i]->DIM == $a[$i]->AMBIENT_DIM){
$f[$count]=$a[$i];
$count=$count+1;
}
}
for ($j=0; $j<$count; ++$j){
$f[$j]=conv($f[$j]);
}
$g[0]=$f[0];
$countg=1;
$c=0;
for ($j=1; $j<$count; ++$j){
for ($k=0; $k<$countg; ++$k){
if (isomorphic($f[$j],$g[$k])==1){
if ($f[$j]->VOLUME==$g[$k]->VOLUME){
if ($f[$j]->N_VERTICES==$g[$k]->N_VERTICES){
$c=1;
}
}
}
}
if ($c==0){
$g[$countg]=$f[$j];
$countg=$countg+1;
}
$c=0;
}
pack_tarball("konvex_2_dim.tgz",@g);
Maybe (hopefully ) there is an easier way, that I forgot to think of.
I hope anyone can help me with that.
Many thanks,
Mandy