From 097f244236b682cc77c6ecf25be4150091d8daf9 Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Sun, 2 Oct 2022 03:04:14 +0000
Subject: CTAN sync 202210020304

---
 info/mathtrip/src/EscherPage10.tex | 68 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 info/mathtrip/src/EscherPage10.tex

(limited to 'info/mathtrip/src/EscherPage10.tex')

diff --git a/info/mathtrip/src/EscherPage10.tex b/info/mathtrip/src/EscherPage10.tex
new file mode 100644
index 0000000000..46d28c18f2
--- /dev/null
+++ b/info/mathtrip/src/EscherPage10.tex
@@ -0,0 +1,68 @@
+%This command draw either the escher knot (the original image)
+%or the escher impossible brick (the new one).
+%
+%The Macro use the global (to the page 10) toggle "OriginalImage"
+%
+%The macro has one parameter:
+%         1) The size to use to typeset the content
+\newcommand\TTenDisplayImage[1]{%
+ \parbox[t]{#1}{%
+    \iftoggle{OriginalImage}{%
+       \vfill
+       \iftoggle{DVIOutput}{%
+           \centerline{\includegraphics[viewport=0 0 135 125]{escher.ps}}%
+       }{%
+           \centerline{\includegraphics[viewport=0 0 135 125]{escher.pdf}}%
+       }%
+    }{%
+       % Author: Julien Cretel
+       % Date:   24/02/2013
+       %
+       %The code was published here:
+       %http://www.texample.net/tikz/examples/escher-brick-penrose-triangle/
+       %
+       \savebox\ImpossibleBrick{%
+       \begin{tikzpicture}[scale=4, line join=bevel]
+   	
+         % \a and \b are two macros defining characteristic
+         % dimensions of the impossible brick.
+         \pgfmathsetmacro{\a}{0.18}
+         \pgfmathsetmacro{\b}{1.37}
+
+         \tikzset{%
+           apply style/.code={\tikzset{##1}},
+           brick_edges/.style={thick,draw=black},
+           face_colourA/.style={fill=gray!50},
+           face_colourB/.style={fill=gray!25},
+           face_colourC/.style={fill=gray!90},
+         }
+
+         \foreach \theta/\v/\facestyleone/\facestyletwo in {%
+           0/0/{brick_edges,face_colourA}/{brick_edges,face_colourC},
+           180/-\a/{brick_edges,face_colourB}/{brick_edges,face_colourC}
+         }{
+         \begin{scope}[rotate=\theta,shift={(\v,0)}]
+           \draw[apply style/.expand once=\facestyleone]  		
+             ({-.5*\b},{1.5*\a}) --
+             ++(\b,0)            --
+             ++(-\a,-\a)         --
+             ++({-\b+2*\a},0)    --
+             ++(0,-{2*\a})       --
+             ++(\b,0)            --
+             ++(-\a,-\a)         --
+             ++(-\b,0)           --
+             cycle;
+           \draw[apply style/.expand once=\facestyletwo] 
+             ({.5*\b},{1.5*\a})  --
+             ++(0,{-2*\a})       --
+             ++(-\a,0)           --
+             ++(0,\a)            --
+             cycle;
+           \end{scope}
+         }
+       \end{tikzpicture}}
+       \par
+       \centerline{\usebox\ImpossibleBrick}
+   }
+ }
+}
-- 
cgit v1.2.3

