summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-folding.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-folding.tex')
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-folding.tex233
1 files changed, 172 insertions, 61 deletions
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-folding.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-folding.tex
index ce23c8a4026..93f832f826c 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-folding.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-folding.tex
@@ -13,19 +13,45 @@
\label{section-calender-folding}
\begin{tikzlibrary}{folding}
- This library defines commands for creating paper folding
- diagrams. Currently, it just contains a single command for creating
- a single diagram, but that one is really useful for creating
- calendars for your (real) desktop.
+ This library defines pic types for creating paper folding
+ diagrams. Many thanks to Nico van Cleemput for providing most of the
+ code.
\end{tikzlibrary}
-\begin{command}{\tikzfoldingdodecahedron|[|\meta{options}|];|}
- This command draws a folding diagram for a dodecahedron. The syntax
- is intended to remind of the |\path| command, but (currently) you
- must specify the \meta{options} and nothing else may be specified
- between the command name and the closing semicolon.
+Here is a big example that produces a diagram for a calendar:
+
+\begin{codeexample}[leave comments]
+\sffamily\scriptsize
+\tikz \pic [
+ transform shape,
+ every calendar/.style={
+ at={(-8ex,4ex)},
+ week list,
+ month label above centered,
+ month text=\bfseries\textcolor{red}{\%mt} \%y0,
+ if={(Sunday) [black!50]}
+ },
+ folding line length=2.5cm,
+ face 1={ \calendar [dates=\the\year-01-01 to \the\year-01-last];},
+ face 2={ \calendar [dates=\the\year-02-01 to \the\year-02-last];},
+ face 3={ \calendar [dates=\the\year-03-01 to \the\year-03-last];},
+ face 4={ \calendar [dates=\the\year-04-01 to \the\year-04-last];},
+ face 5={ \calendar [dates=\the\year-05-01 to \the\year-05-last];},
+ face 6={ \calendar [dates=\the\year-06-01 to \the\year-06-last];},
+ face 7={ \calendar [dates=\the\year-07-01 to \the\year-07-last];},
+ face 8={ \calendar [dates=\the\year-08-01 to \the\year-08-last];},
+ face 9={ \calendar [dates=\the\year-09-01 to \the\year-09-last];},
+ face 10={\calendar [dates=\the\year-10-01 to \the\year-10-last];},
+ face 11={\calendar [dates=\the\year-11-01 to \the\year-11-last];},
+ face 12={\calendar [dates=\the\year-12-01 to \the\year-12-last];}
+] {dodecahedron folding};
+\end{codeexample}
+
+The foldings are sorted by number of faces.
- The following keys may be used in the \meta{options}:
+\begin{pictype}{tetrahedron folding}{}
+ This pic type draws a folding diagram for a tetrahedron.
+ The following keys influence the pic:
\begin{key}{/tikz/folding line length=\meta{dimension}}
Sets the length of the base line for folding. For the dodecahedron
this is the length of all the sides of the pentagons.
@@ -40,31 +66,22 @@
Same as |face 1|, but for the second face.
\end{key}
\begin{key}{/tikz/face 3=\meta{code}}
- Same as |face 1|, but for the third face.
\end{key}
- There are further similar options, ending with the following:
- \begin{key}{/tikz/face 12=\meta{code}}
- Same as |face 1|, but for the last face.
+ \begin{key}{/tikz/face 4=\meta{code}}
\end{key}
+ There are further similar options for more faces (for commands
+ shown later).
Here is a simple example:
\begin{codeexample}[]
-\begin{tikzpicture}[transform shape]
- \tikzfoldingdodecahedron
- [folding line length=6mm,
+\tikz \pic [
+ transform shape,
+ folding line length=6mm,
face 1={ \node[red] {1};},
face 2={ \node {2};},
face 3={ \node {3};},
- face 4={ \node {4};},
- face 5={ \node {5};},
- face 6={ \node {6};},
- face 7={ \node {7};},
- face 8={ \node {8};},
- face 9={ \node {9};},
- face 10={\node {10};},
- face 11={\node {11};},
- face 12={\node {12};}];
-\end{tikzpicture}
+ face 4={ \node {4};}
+] {tetrahedron folding};
\end{codeexample}
The appearance of the cut and folding lines can be influenced using
@@ -76,47 +93,141 @@
Executed for every line that should be
folded.
\begin{codeexample}[]
-\begin{tikzpicture}[every cut/.style=red,every fold/.style=dotted]
- \tikzfoldingdodecahedron[folding line length=6mm];
-\end{tikzpicture}
+\tikz \pic[
+ every cut/.style=red,
+ every fold/.style=dotted,
+ folding line length=6mm
+] { tetrahedron folding };
\end{codeexample}
\end{stylekey}
-\end{command}
+
+ There is one style that is mainly useful for the present
+ documentation:
+ \begin{stylekey}{/tikz/numbered faces}
+ Sets |face |\meta{i} to |\node {|\meta{i}|};| for all~$i$.
+ \end{stylekey}
+
+\end{pictype}
-Here is a big example that produces a diagram for a calendar:
+\begin{pictype}{tetrahedron truncated folding}{}
+ A folding of a truncated tetrahedron.
+\begin{codeexample}[width=5cm]
+\tikz \pic [folding line length=6mm, numbered faces, transform shape]
+ { tetrahedron truncated folding };
+\end{codeexample}
+\end{pictype}
-\begin{codeexample}[leave comments]
-\sffamily\scriptsize
-\begin{tikzpicture}
- [transform shape,
- every calendar/.style=
- {
- at={(-8ex,4ex)},
- week list,
- month label above centered,
- month text=\bfseries\textcolor{red}{\%mt} \%y0,
- if={(Sunday) [black!50]}
- }]
- \tikzfoldingdodecahedron
- [
- folding line length=2.5cm,
- face 1={ \calendar [dates=\the\year-01-01 to \the\year-01-last];},
- face 2={ \calendar [dates=\the\year-02-01 to \the\year-02-last];},
- face 3={ \calendar [dates=\the\year-03-01 to \the\year-03-last];},
- face 4={ \calendar [dates=\the\year-04-01 to \the\year-04-last];},
- face 5={ \calendar [dates=\the\year-05-01 to \the\year-05-last];},
- face 6={ \calendar [dates=\the\year-06-01 to \the\year-06-last];},
- face 7={ \calendar [dates=\the\year-07-01 to \the\year-07-last];},
- face 8={ \calendar [dates=\the\year-08-01 to \the\year-08-last];},
- face 9={ \calendar [dates=\the\year-09-01 to \the\year-09-last];},
- face 10={\calendar [dates=\the\year-10-01 to \the\year-10-last];},
- face 11={\calendar [dates=\the\year-11-01 to \the\year-11-last];},
- face 12={\calendar [dates=\the\year-12-01 to \the\year-12-last];}
- ];
-\end{tikzpicture}
+
+\begin{pictype}{cube folding}{}
+ A folding of a cube.
+\begin{codeexample}[]
+\tikz \pic [folding line length=6mm, numbered faces, transform shape]
+ { cube folding };
\end{codeexample}
+\end{pictype}
+
+
+\begin{pictype}{cube truncated folding}{}
+ A folding of a truncated cube.
+\begin{codeexample}[width=5cm]
+\tikz \pic [folding line length=6mm, numbered faces, transform shape]
+ { cube truncated folding };
+\end{codeexample}
+\end{pictype}
+
+\begin{pictype}{octahedron folding}{}
+ A folding of an octahedron.
+\begin{codeexample}[]
+\tikz \pic [folding line length=6mm, numbered faces, transform shape]
+ { octahedron folding };
+\end{codeexample}
+\end{pictype}
+
+
+\begin{pictype}{octahedron folding}{}
+ A folding of a truncated octahedron.
+\begin{codeexample}[]
+\tikz \pic [folding line length=6mm, numbered faces, transform shape]
+ { octahedron truncated folding };
+\end{codeexample}
+\end{pictype}
+
+
+\begin{pictype}{dodecahedron folding}{}
+ A folding of a dodecahedron.
+
+\begin{codeexample}[]
+\tikz \pic [folding line length=6mm, numbered faces, transform shape]
+ { dodecahedron folding };
+\end{codeexample}
+\end{pictype}
+
+\begin{pictype}{dodecahedron' folding}{}
+ This is an alternative folding of a dodecahedron.
+\begin{codeexample}[]
+\tikz \pic [folding line length=6mm, numbered faces, transform shape]
+ { dodecahedron' folding };
+\end{codeexample}
+\end{pictype}
+
+
+
+
+\begin{pictype}{cuboctahedron folding}{}
+ A folding of a cuboctahedron.
+\begin{codeexample}[]
+\tikz \pic [folding line length=6mm, numbered faces, transform shape]
+ { cuboctahedron folding };
+\end{codeexample}
+\end{pictype}
+
+
+\begin{pictype}{cuboctahedron truncated folding}{}
+ A folding of a truncated cuboctahedron.
+\begin{codeexample}[]
+\tikz \pic [folding line length=6mm, numbered faces, transform shape]
+ { cuboctahedron truncated folding };
+\end{codeexample}
+\end{pictype}
+
+
+\begin{pictype}{icosahedron folding}{}
+ A folding of an icosahedron.
+\begin{codeexample}[]
+\tikz \pic [folding line length=6mm, numbered faces, transform shape]
+ { icosahedron folding };
+\end{codeexample}
+\end{pictype}
+
+
+\begin{pictype}{rhombicuboctahedron folding}{}
+ A folding of an rhombicuboctahedron.
+\begin{codeexample}[]
+\tikz \pic [folding line length=6mm, numbered faces, transform shape]
+ { rhombicuboctahedron folding };
+\end{codeexample}
+\end{pictype}
+
+
+\begin{pictype}{snub cube folding}{}
+ A folding of a snub cube.
+\begin{codeexample}[width=5cm]
+\tikz \pic [folding line length=6mm, numbered faces, transform shape]
+ { snub cube folding };
+\end{codeexample}
+\end{pictype}
+
+
+\begin{pictype}{icosidodecahedron folding}{}
+ A folding of an icosidodecahedron.
+\begin{codeexample}[]
+\tikz \pic [folding line length=6mm, numbered faces, transform shape]
+ { icosidodecahedron folding };
+\end{codeexample}
+\end{pictype}
+
%%% Local Variables: