3
$\begingroup$

The following will show me a single example net of a polyhedron

PolyhedronData["Dodecahedron", "Net"]

enter image description here

And

PolyhedronData["Dodecahedron", "NetCount"]

tells me that there are 43,380 ways to unfold a dodecahedron.

But I can't find any method that I can use to iterate through all of the nets of a polyhedron to see what they look like. Is there an easy way to do that?

$\endgroup$
1
  • 1
    $\begingroup$ The PolyhedronData is not well done. For example, PolyhedronData["Сube", "Net"] produces "PolyhedronData::notent: Сube is not a known entity, class, or tag for PolyhedronData. Use PolyhedronData[] for a list of entities" though the result of PolyhedronData[] includes Cube. $\endgroup$
    – user64494
    Dec 12, 2023 at 6:03

1 Answer 1

4
$\begingroup$

The number of possible nets for complex enough polyhedra is substantially large to overload your resources if algorithm is not smartly designed. You can look at the Source Notebook of the cool function RandomPolyhedralNet to try to design something efficient. Though the next best thing to "all of the nets" is walking through randomly generated nets. RandomPolyhedralNet can take SeedRandom. This allows you to design an app like this:

Manipulate[
 SeedRandom[k];
 Graphics[Map[Line,
  ResourceFunction["RandomPolyhedralNet"]
  [Entity["Polyhedron", "JabulaniPolyhedron"]]],
 ImageSize->{300,300}],
{k,1,1000,1,Appearance->"Open"}]

enter image description here

You can also display things in a large batches removing potential duplicates - note in batches you also can control reproducibility with SeedRandom:

batchN=100;SeedRandom[13];
coor=Union[ParallelTable[
 ResourceFunction["RandomPolyhedralNet"]
 [Entity["Polyhedron", "JabulaniPolyhedron"]],batchN]];
Print["Number of removed duplicates = "<>ToString[Length[coor]-batchN]]
Graphics[Map[Line,#],ImageSize->50]&/@coor

enter image description here

$\endgroup$
6
  • $\begingroup$ Unfortunately, ResourceFunction["RandomPolyhedralNet"]["Dodecahedron"] fails. The documentation says that the command works only with simple polyhedrons. $\endgroup$
    – user64494
    Dec 15, 2023 at 7:30
  • 3
    $\begingroup$ @user64494 It does work. If you would look carefully through the docs you'd realize you need to put Entity not String: ResourceFunction["RandomPolyhedralNet"][ Entity["Polyhedron", "Dodecahedron"]] $\endgroup$ Dec 15, 2023 at 7:42
  • $\begingroup$ @VitalyKaurov: Thank you for your valuable comment. $\endgroup$
    – user64494
    Dec 15, 2023 at 8:48
  • $\begingroup$ When you say "remove duplicates", does it remove duplicates according to isomorphism (i.e. two isomorphic nets are considered duplicates) or is it possible that it will show multiples of the same net that are just rotated differently? $\endgroup$ Dec 15, 2023 at 16:18
  • 2
    $\begingroup$ @PeterOlson you can try to use FindGeometricTransform to detect duplicates via basic trnasofrmations. $\endgroup$ Dec 15, 2023 at 19:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.