<?xml version="1.0" encoding="UTF-8"?>

<screensaver name="platonicfolding" _label="Platonic Folding" gl="yes">

  <video href="https://www.youtube.com/watch?v=4TH0rrz2Pbc"/>

  <command arg="--root"/>

  <hgroup>

    <boolean id="rotate" _label="Rotate" arg-unset="--no-rotate"/>

    <select id="colors">
      <option id="random" _label="Random coloration"/>
      <option id="face"   _label="Face colors"  arg-set="--colors face"/>
      <option id="earth"  _label="Earth colors" arg-set="--colors earth"/>
    </select>

    <select id="foldings">
      <option id="random" _label="Random number of foldings"/>
      <option id="1"      _label="1 folding"   arg-set="--foldings 1"/>
      <option id="2"      _label="2 foldings"  arg-set="--foldings 2"/>
      <option id="3"      _label="3 foldings"  arg-set="--foldings 3"/>
      <option id="4"      _label="4 foldings"  arg-set="--foldings 4"/>
      <option id="5"      _label="5 foldings"  arg-set="--foldings 5"/>
      <option id="6"      _label="6 foldings"  arg-set="--foldings 6"/>
      <option id="7"      _label="7 foldings"  arg-set="--foldings 7"/>
      <option id="8"      _label="8 foldings"  arg-set="--foldings 8"/>
      <option id="9"      _label="9 foldings"  arg-set="--foldings 9"/>
      <option id="10"     _label="10 foldings" arg-set="--foldings 10"/>
      <option id="11"     _label="11 foldings" arg-set="--foldings 11"/>
      <option id="12"     _label="12 foldings" arg-set="--foldings 12"/>
      <option id="13"     _label="13 foldings" arg-set="--foldings 13"/>
      <option id="14"     _label="14 foldings" arg-set="--foldings 14"/>
      <option id="15"     _label="15 foldings" arg-set="--foldings 15"/>
      <option id="16"     _label="16 foldings" arg-set="--foldings 16"/>
      <option id="17"     _label="17 foldings" arg-set="--foldings 17"/>
      <option id="18"     _label="18 foldings" arg-set="--foldings 18"/>
      <option id="19"     _label="19 foldings" arg-set="--foldings 19"/>
      <option id="20"     _label="20 foldings" arg-set="--foldings 20"/>
    </select>
  </hgroup>

  <hgroup>
    <boolean id="showfps" _label="Show frame rate" arg-set="--fps"/>
    <number id="delay" type="slider" arg="--delay %"
            _label="Frame rate" _low-label="Low" _high-label="High"
            low="0" high="100000" default="25000"
            convert="invert"/>
  </hgroup>
  <xscreensaver-updater />

  <_description>
The unfolding and folding of the Platonic solids.

For the five Platonic solids (the tetrahedron, cube, octahedron,
dodecahedron, and icosahedron), all unfoldings of its faces are
non-overlapping: they form a net. The tetrahedron has 16 unfoldings,
of which two are essentially different (non-isomorphic), the cube and
octahedron each have 384 unfoldings, of which eleven are
non-isomorphic, and the dodecahedron and icosahedron each have
5,184,000 unfoldings, of which 43,380 are non-isomorphic. This program
displays randomly selected unfoldings for the five Platonic solids.
The faces of the Platonic solids are either folded jointly or
successively. Note that while it is guaranteed that the nets of the
Platonic solids are non-overlapping, their faces may occasionally
intersect during the unfolding and folding.

https://en.wikipedia.org/wiki/Platonic_solid
https://en.wikipedia.org/wiki/Net_(polyhedron)

Written by Carsten Steger; 2025.
  </_description>
</screensaver>
