I'd like to construct all the face figures of P. My code is
Code: Select all
sub faceFigures {
my ($p) = @_;
my $v = $p -> VERTICES;
my $hd = $p -> HASSE_DIAGRAM;
my $dim = $p -> DIM;
for (my $d = $dim; $d >= 0; --$d) {
foreach (@{$hd -> nodes_of_dim($d)}) {
my $f = new Polytope<Rational>(VERTICES=>$v->minor($hd->FACES->[$_],All));
my $fd = polarize( center($f) );
print $fd -> DIM;
}
}
}