summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/penrose
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-01-23 22:20:01 +0000
committerKarl Berry <karl@freefriends.org>2021-01-23 22:20:01 +0000
commitd3eb571a398db6e856ffeabeb97082ebbd349fce (patch)
tree218dc9433125bf094990af9bbabed597756cc603 /Master/texmf-dist/doc/latex/penrose
parent579876debb505bde01946475ccc9ccfbd6c83d0c (diff)
penrose (23jan21)
git-svn-id: svn://tug.org/texlive/trunk@57507 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/penrose')
-rw-r--r--Master/texmf-dist/doc/latex/penrose/README8
-rw-r--r--Master/texmf-dist/doc/latex/penrose/penrose.pdfbin552561 -> 557513 bytes
-rw-r--r--Master/texmf-dist/doc/latex/penrose/penrose.tex151
-rw-r--r--Master/texmf-dist/doc/latex/penrose/penrose_code.pdfbin394873 -> 464179 bytes
4 files changed, 115 insertions, 44 deletions
diff --git a/Master/texmf-dist/doc/latex/penrose/README b/Master/texmf-dist/doc/latex/penrose/README
new file mode 100644
index 00000000000..43c2298f5f0
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/penrose/README
@@ -0,0 +1,8 @@
+----------------------------------------------------------------
+penrose --- TikZ library for producing Penrose tilings
+E-mail: loopspace@mathforge.org
+Released under the LaTeX Project Public License v1.3c or later
+See http://www.latex-project.org/lppl.txt
+----------------------------------------------------------------
+
+This package is for the creation of Penrose tilings using either kite-and-dart or rhombuses, and either by manual placement or automatic generation.
diff --git a/Master/texmf-dist/doc/latex/penrose/penrose.pdf b/Master/texmf-dist/doc/latex/penrose/penrose.pdf
index 089af307243..67ea7a93096 100644
--- a/Master/texmf-dist/doc/latex/penrose/penrose.pdf
+++ b/Master/texmf-dist/doc/latex/penrose/penrose.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/penrose/penrose.tex b/Master/texmf-dist/doc/latex/penrose/penrose.tex
index b381149ee20..be44311844c 100644
--- a/Master/texmf-dist/doc/latex/penrose/penrose.tex
+++ b/Master/texmf-dist/doc/latex/penrose/penrose.tex
@@ -1,4 +1,4 @@
-\immediate\write18{tex penrose_code.dtx}
+%\immediate\write18{tex penrose_code.dtx}
\documentclass{ltxdoc}
\usepackage[T1]{fontenc}
\usepackage{trace}
@@ -12,8 +12,15 @@
\usepackage{listings}
\lstloadlanguages{[LaTeX]TeX}
-\lstset{breakatwhitespace=true,breaklines=true,language=TeX}
-
+\lstset{
+ breakatwhitespace=true,
+ breaklines=true,
+ language=[LaTeX]TeX,
+ basicstyle=\small\ttfamily,
+ keepspaces=true,
+ columns=fullflexible
+}
+
\usepackage{fancyvrb}
\newenvironment{example}
@@ -23,7 +30,6 @@
\begin{center}
\setlength{\parindent}{0pt}
\fbox{\begin{minipage}{.9\linewidth}
- \lstset{breakatwhitespace=true,breaklines=true,language=TeX,basicstyle=\small}
\lstinputlisting[]{example.out}
\end{minipage}}
@@ -41,7 +47,6 @@
\begin{center}
\setlength{\parindent}{0pt}
\fbox{\begin{minipage}{.9\linewidth}
- \lstset{breakatwhitespace=true,breaklines=true,language=TeX,basicstyle=\small}
\lstinputlisting[]{example.out}
\end{minipage}}
\end{center}
@@ -73,18 +78,21 @@
\makeatother
\providecommand*{\url}{\texttt}
+\GetFileInfo{tikzlibrarypenrose.code.tex}
\title{The \textsf{Penrose} Package: Documentation}
\author{Andrew Stacey\texorpdfstring{\\ \url{loopspace@mathforge.org}}{}}
-\date{1.0~from 2018/07/10}
+ \date{\fileversion~from \filedate}
\begin{document}
\maketitle
+\tableofcontents
+
\section{Introduction}
The \textsf{Penrose} package is a TikZ library for drawing Penrose tiles.
-It currently supports the kite/dart, rhombus, and pentagon tile sets.
+It currently supports natively the kite/dart, rhombus, and pentagon tile sets, but has provision for defining new tiles.
There are two main methods for their placement: one that automatically generates a tiling, and one that allows for ``by hand'' placement.
Furthermore, the tiles themselves can be deformed and will still (hopefully!) fit together in the correct fashion.
@@ -148,7 +156,7 @@ If the shortcut keys are used to specify the tiles, this can be put in the \Verb
TikZ \Verb+pic+s can be named, using the \Verb+name=<name>+ key.
When a Penrose tile has been named then it can be used for positioning other tiles.
-Each edge is assigned a label from \Verb+a b c A B C+ and a new tile can be aligned with an old one along a matching edge (\Verb+a+ matches with \Verb+A+ and so on).
+Each edge is assigned a label from \Verb+a b c d e A B C D E+ and a new tile can be aligned with an old one along a matching edge (\Verb+a+ matches with \Verb+A+ and so on).
The edge labels are as follows.
For the \Verb+pentagon 5+, for example, the edges are all the same and the numbers are used to distinguish between them.
@@ -273,7 +281,7 @@ In practical terms, this means that if drawn then the line width is half that wh
There is a way to specify a Penrose tiling using \emph{Lindenmayer systems}.
In brief, this takes a golden triangle or gnomon (or one of the reverse ones) and repeatedly decomposes it into smaller triangles and gnomon.
Once a desired level has been reached, the resulting triangles and gnomon are glued together in pairs to create either darts and kites or rhombuses (of both types).
-This library contains an implementation of this both for each of the tilings.
+This library contains an implementation of this for each of the tilings.
The user command is:
%
@@ -351,41 +359,44 @@ Indeed, by using asymmetric paths, the matching rules can be enforced without th
Internally, the \Verb+penrose+ library uses the \Verb+spath3+ package for storing and manipulating the paths.
-To create a new edge path, use the key \Verb+save Penrose path=<edge>+ where \Verb+<edge>+ is one of \Verb+a+, \Verb+b+, \Verb+c+, or \Verb+d+.
+To create a new edge path, use the key \Verb+save Penrose path=<edge>+ where \Verb+<edge>+ is a symbol used in the edge description of a tile.
There are no constraints on the size of the path as all paths are scaled and transformed to fit the tiles.
Once the edge paths have been specified, they are welded together into the tiles using the following command:
%
\begin{verbatim}
-\MakePenroseTile{<name>}
+\BakePenroseTile{<name>}
\end{verbatim}
%
Here, \Verb+<name>+ is one of the names of the tiles.
This has global effect, as does the definition of the edge paths.
-Internally, the tile paths are stored as \Verb+spath+ objects (from the \Verb+spath3+ package) so the commands of that package can be used to, for example, make a copy of a tile.
-The internal name for a tile path is \Verb+Penrosepathtile<name>+ (no spaces) so can be cloned via:
+Paths, both sides and tiles, can be cloned via:
%
\begin{verbatim}
-\CloneSPath{Penrosepathtile<name>}{My Amazing Penrose Tile}
+\tikzset{clone Penrose side path={target}{source}
+\tikzset{clone Penrose tile path={target}{source}
\end{verbatim}
%
and restored with the same command (but names switched).
+The initial version of this package used \Verb!\MakePenroseTile! for this command.
+That command is still available for backwards compatibility.
+
\begin{example}
\begin{tikzpicture}
\pic[draw,dart,name=dart];
\pic[draw,kite,align with=dart along c];
\pic[draw,kite,align with=dart along C];
-\CloneSPath{Penrosepathtilekite}{Original kite}
-\CloneSPath{Penrosepathtiledart}{Original dart}
+\tikzset{clone Penrose tile path={original kite}{kite}}
+\tikzset{clone Penrose tile path={original dart}{dart}}
\path[save Penrose path=a] (0,0) to[out=-30,in=100] (1,0);
\path[save Penrose path=c] (0,0) to[out=-40,in=140] (1,0);
-\MakePenroseTile{kite}
-\MakePenroseTile{dart}
+\BakePenroseTile{kite}
+\BakePenroseTile{dart}
\pic[xshift=2cm,draw,dart,name=dart];
\pic[draw,kite,align with=dart along c];
\pic[draw,kite,align with=dart along C];
-\CloneSPath{Original kite}{Penrosepathtilekite}
-\CloneSPath{Original dart}{Penrosepathtiledart}
+\tikzset{clone Penrose tile path={kite}{original kite}}
+\tikzset{clone Penrose tile path={dart}{original dart}}
\pic[xshift=4cm,draw,dart,name=dart];
\pic[draw,kite,align with=dart along c];
\pic[draw,kite,align with=dart along C];
@@ -394,6 +405,58 @@ and restored with the same command (but names switched).
With deformed tiles, there is no guarantee that the inner arcs will match up perfectly.
+\section{Defining New Tiles}
+
+This package includes the capability to define new tiles.
+The command to do this is:
+%
+\begin{verbatim}
+\DefineTile{<name>}{<sides>}{<coordinates>}
+\end{verbatim}
+%
+For example,
+%
+\begin{verbatim}
+\DefineTile {square}{a A a A}
+{
+ {0,0}
+ {1,0}
+ {1,1}
+ {0,1}
+}
+\end{verbatim}
+%
+The \Verb!<sides>! is a list of sides for matching rules.
+Each letter used matches against its opposite case (so it is possible to create a side that matches against itself by using a symbol that \TeX\ regards as having the same upper as lower case; not all symbols work, I've used \Verb+!+ successfully).
+These are also used in path replacing, both a letter and its opposite case are replaced by the corresponding path (but in opposite directions) when the tile is ``baked''.
+The coordinates are passed to the \Verb!fp! module of \LaTeX3 so can involve complicated expressions.
+Note that the trigonometric functions for angles in degrees are \Verb!cosd!, \Verb!sind!, and \Verb!tand!.
+
+Note that the tile must be baked via the command \Verb!\BakePenroseTile! before it can be used.
+
+The new tile can be used with all the same features as the pre-defined Penrose tiles, except for the Lindenmayer systems.
+
+\begin{example}
+\DefineTile {square}{a A a A}
+{
+ {0,0}
+ {1,0}
+ {1,1}
+ {0,1}
+}
+
+\begin{tikzpicture}
+\path[save Penrose path=a] (0,0) to[out=45,in=135] (1,0);
+\BakePenroseTile{square}
+\pic[square,name=A,fill=green];
+\pic[square,align with=A along a1 using 2,name=B,fill=red];
+\pic[square,align with=A along A1 using 2,fill=red];
+\pic[square,align with=A along A2 using 1,fill=red];
+\pic[square,align with=B along a1 using 2,fill=green];
+\pic[square,align with=B along a2 using 1,fill=green];
+\end{tikzpicture}
+\end{example}
+
\section{More Examples}
Let's set some aesthetically pleasing shapes.
@@ -403,14 +466,14 @@ Let's set some aesthetically pleasing shapes.
\path[save Penrose path=a] (0,0) to[out=-30,in=100] (1,0);
\path[save Penrose path=b] (0,0) to[out=0,in=140] (1,0);
\path[save Penrose path=c] (0,0) to[out=-40,in=140] (1,0);
-\MakePenroseTile{thin rhombus}
-\MakePenroseTile{thick rhombus}
-\MakePenroseTile{golden triangle}
-\MakePenroseTile{reverse golden triangle}
-\MakePenroseTile{golden gnomon}
-\MakePenroseTile{reverse golden gnomon}
-\MakePenroseTile{kite}
-\MakePenroseTile{dart}
+\BakePenroseTile{thin rhombus}
+\BakePenroseTile{thick rhombus}
+\BakePenroseTile{golden triangle}
+\BakePenroseTile{reverse golden triangle}
+\BakePenroseTile{golden gnomon}
+\BakePenroseTile{reverse golden gnomon}
+\BakePenroseTile{kite}
+\BakePenroseTile{dart}
\end{tikzpicture}
\end{justexample}
@@ -418,14 +481,14 @@ Let's set some aesthetically pleasing shapes.
\path[save Penrose path=a] (0,0) to[out=-30,in=100] (1,0);
\path[save Penrose path=b] (0,0) to[out=0,in=140] (1,0);
\path[save Penrose path=c] (0,0) to[out=-40,in=140] (1,0);
-\MakePenroseTile{thin rhombus}
-\MakePenroseTile{thick rhombus}
-\MakePenroseTile{golden triangle}
-\MakePenroseTile{reverse golden triangle}
-\MakePenroseTile{golden gnomon}
-\MakePenroseTile{reverse golden gnomon}
-\MakePenroseTile{kite}
-\MakePenroseTile{dart}
+\BakePenroseTile{thin rhombus}
+\BakePenroseTile{thick rhombus}
+\BakePenroseTile{golden triangle}
+\BakePenroseTile{reverse golden triangle}
+\BakePenroseTile{golden gnomon}
+\BakePenroseTile{reverse golden gnomon}
+\BakePenroseTile{kite}
+\BakePenroseTile{dart}
\end{tikzpicture}
@@ -676,14 +739,14 @@ Lastly, here's an example that generates full page patterns.
\path[save Penrose path=a] (0,0) -- (1,0);
\path[save Penrose path=b] (0,0) -- (1,0);
\path[save Penrose path=c] (0,0) -- (1,0);
-\MakePenroseTile{thin rhombus}
-\MakePenroseTile{thick rhombus}
-\MakePenroseTile{golden triangle}
-\MakePenroseTile{reverse golden triangle}
-\MakePenroseTile{golden gnomon}
-\MakePenroseTile{reverse golden gnomon}
-\MakePenroseTile{kite}
-\MakePenroseTile{dart}
+\BakePenroseTile{thin rhombus}
+\BakePenroseTile{thick rhombus}
+\BakePenroseTile{golden triangle}
+\BakePenroseTile{reverse golden triangle}
+\BakePenroseTile{golden gnomon}
+\BakePenroseTile{reverse golden gnomon}
+\BakePenroseTile{kite}
+\BakePenroseTile{dart}
\end{tikzpicture}
\newpage
diff --git a/Master/texmf-dist/doc/latex/penrose/penrose_code.pdf b/Master/texmf-dist/doc/latex/penrose/penrose_code.pdf
index b30a2d34427..59579b2524a 100644
--- a/Master/texmf-dist/doc/latex/penrose/penrose_code.pdf
+++ b/Master/texmf-dist/doc/latex/penrose/penrose_code.pdf
Binary files differ