;# Puiseux fractions $k = klee_minty_cube(3); $k->VISUAL; print $k->FACETS; $monomial=new UniMonomial(1); $x=new PuiseuxFraction($monomial); $k = klee_minty_cube(3,$x); print $k->FACETS; print $k->VOLUME; print isomorphic($k,cube(3)); ;# examples for interactive help (and documentation) help "pyramid"; help "ALTSHULER_DET"; $t=typeof $k; print join(", ", sorted_uniq(sort { $a cmp $b } map { keys %{$_->properties} } $t, @{$t->super})); ;# regular polytopes and friends $p=archimedean_solid("truncated_dodecahedron"); print $p; print $p->VERTICES->[0]; catalan_solid("deltoidal_icositetrahedron")->VISUAL; # %colors=(0=>"gray",3=>"green",4=>"yellow",5=>"orange",6=>"red",7=>"purple",8=>"blue"); sub color_by_size($) { my ($this)=@_; my @colors= map { my $c=$colors{$_}; defined($c)? $c : $colors{0} } @{$this->FACET_SIZES}; return \@colors } $j=johnson_solid(42); $jc=color_by_size($j); $j->VISUAL(VertexLabels=>"hidden",FacetColor=>$jc); ;# planar nets sub colored_planar_net($) { my ($p)=@_; my $colors=color_by_size($p); postscript(fan::planar_net($p)->VISUAL(VertexLabels=>"hidden",FacetColor=>$colors)) } colored_planar_net( johnson_solid(42) ); colored_planar_net( johnson_solid(80) ); colored_planar_net( johnson_solid(84) ); colored_planar_net( johnson_solid(92) ); colored_planar_net( prism(n_gon(100)) );