PGF/TikZ Manual

# The TikZ and PGF Packages Manual for version 3.1.9a

## Libraries

#### 61Paper-Folding Diagrams Library

• TikZ Library folding

• \usetikzlibrary{folding} % and plain
\usetikzlibrary[folding] % Cont

This library defines pic types for creating paper-folding diagrams. Many thanks to Nico van Cleemput for providing most of the code.

Here is a big example that produces a diagram for a calendar:

The foldings are sorted by number of faces.

• Pic type tetrahedron folding

• This pic type draws a folding diagram for a tetrahedron. The following keys influence the pic:

• /tikz/folding line length=dimension(no default)

• Sets the length of the base line for folding. For the dodecahedron this is the length of all the sides of the pentagons.

• /tikz/face 1=code(no default)

• The code is executed for the first face of the dodecahedron. When it is executed, the coordinate system will have been shifted and rotated such that it lies at the middle of the first face of the dodecahedron.

• /tikz/face 2=code(no default)

• Same as face 1, but for the second face.

• /tikz/face 3=code(no default)

• /tikz/face 4=code(no default)

There are further similar options for more faces (for commands shown later).

Here is a simple example:

The appearance of the cut and folding lines can be influenced using the following styles:

• /tikz/every cut(style, initially empty)

• Executed for every line that should be cut using scissors.

• /tikz/every fold(style, initially help lines)

• Executed for every line that should be folded.

There is one style that is mainly useful for the present documentation:

• /tikz/numbered faces(style, no value)

• Sets face i to \node {i}; for all $$i$$.

• Pic type tetrahedron truncated folding

• A folding of a truncated tetrahedron.

• Pic type cube folding

• A folding of a cube.

• Pic type cube truncated folding

• A folding of a truncated cube.

• Pic type octahedron folding

• A folding of an octahedron.

• Pic type octahedron folding

• A folding of a truncated octahedron.

• Pic type dodecahedron folding

• A folding of a dodecahedron.

• Pic type dodecahedron' folding

• This is an alternative folding of a dodecahedron.

• Pic type cuboctahedron folding

• A folding of a cuboctahedron.

• Pic type cuboctahedron truncated folding

• A folding of a truncated cuboctahedron.

• Pic type icosahedron folding

• A folding of an icosahedron.

• Pic type rhombicuboctahedron folding

• A folding of an rhombicuboctahedron.

• Pic type snub cube folding

• A folding of a snub cube.

• Pic type icosidodecahedron folding

• A folding of an icosidodecahedron.