summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/penrose/tikzlibrarypenrose.code.tex
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/tex/latex/penrose/tikzlibrarypenrose.code.tex
parent579876debb505bde01946475ccc9ccfbd6c83d0c (diff)
penrose (23jan21)
git-svn-id: svn://tug.org/texlive/trunk@57507 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/penrose/tikzlibrarypenrose.code.tex')
-rw-r--r--Master/texmf-dist/tex/latex/penrose/tikzlibrarypenrose.code.tex802
1 files changed, 509 insertions, 293 deletions
diff --git a/Master/texmf-dist/tex/latex/penrose/tikzlibrarypenrose.code.tex b/Master/texmf-dist/tex/latex/penrose/tikzlibrarypenrose.code.tex
index e5b743f4d12..8be0db1cd14 100644
--- a/Master/texmf-dist/tex/latex/penrose/tikzlibrarypenrose.code.tex
+++ b/Master/texmf-dist/tex/latex/penrose/tikzlibrarypenrose.code.tex
@@ -4,7 +4,7 @@
%%
%% The original source files were:
%%
-%% penrose_code.dtx (with options: `library')
+%% penrose_code.dtx (with options: `package')
%% ----------------------------------------------------------------
%% penrose --- TikZ library for producing Penrose tilings
%% E-mail: loopspace@mathforge.org
@@ -12,34 +12,60 @@
%% See http://www.latex-project.org/lppl.txt
%% ----------------------------------------------------------------
%%
+\ProvidesExplFile {tikzlibrarypenrose.code.tex} {2021/01/22} {1.4} {TikZ pics for Penrose and other tiles}
\RequirePackage{spath3}
+\usetikzlibrary{spath3}
\ExplSyntaxOn
-\MakeSPath{Penrose path a}
- {
- \pgfsyssoftpath@movetotoken{0pt}{0pt}
- \pgfsyssoftpath@linetotoken{1pt}{0pt}
- }
-\SPathPrepare{Penrose path a}
-\CloneSPath {Penrose path a}{Penrose path b}
-\CloneSPath {Penrose path a}{Penrose path c}
-\CloneSPath {Penrose path a}{Penrose path d}
-\CloneSPath {Penrose path a}{Penrose path A}
-\CloneSPath {Penrose path a}{Penrose path B}
-\CloneSPath {Penrose path a}{Penrose path C}
-\CloneSPath {Penrose path a}{Penrose path D}
+\tl_new:N \g__penrose_side_a_tl
+\tl_new:N \g__penrose_side_b_tl
+\tl_new:N \g__penrose_side_c_tl
+\tl_new:N \g__penrose_side_d_tl
+\tl_new:N \g__penrose_side_e_tl
+\tl_new:N \g__penrose_side_A_tl
+\tl_new:N \g__penrose_side_B_tl
+\tl_new:N \g__penrose_side_C_tl
+\tl_new:N \g__penrose_side_D_tl
+\tl_new:N \g__penrose_side_E_tl
+\tl_gset:Nn \g__penrose_side_a_tl
+{
+ \pgfsyssoftpath@movetotoken{0pt}{0pt}
+ \pgfsyssoftpath@linetotoken{1pt}{0pt}
+}
+\tl_gset_eq:NN \g__penrose_side_b_tl \g__penrose_side_a_tl
+\tl_gset_eq:NN \g__penrose_side_c_tl \g__penrose_side_a_tl
+\tl_gset_eq:NN \g__penrose_side_d_tl \g__penrose_side_a_tl
+\tl_gset_eq:NN \g__penrose_side_e_tl \g__penrose_side_a_tl
+\tl_gset_eq:NN \g__penrose_side_A_tl \g__penrose_side_a_tl
+\tl_gset_eq:NN \g__penrose_side_B_tl \g__penrose_side_a_tl
+\tl_gset_eq:NN \g__penrose_side_C_tl \g__penrose_side_a_tl
+\tl_gset_eq:NN \g__penrose_side_D_tl \g__penrose_side_a_tl
+\tl_gset_eq:NN \g__penrose_side_E_tl \g__penrose_side_a_tl
\fp_new:N \l__penrose_tmpa_fp
\fp_new:N \l__penrose_tmpb_fp
\fp_new:N \l__penrose_tmpc_fp
+\str_new:N \l__penrose_tmpa_str
+\str_new:N \l__penrose_tmpb_str
\tl_new:N \l__penrose_tmpa_tl
\tl_new:N \l__penrose_tmpb_tl
\tl_new:N \l__penrose_tmpc_tl
-\cs_new_nopar:Npn \penrose_normalise_path:n #1
+\tl_new:N \l__penrose_tmpd_tl
+\tl_new:N \l__penrose_tmp_tile_path_tl
+\tl_new:N \g__penrose_smuggle_tl
+\int_new:N \l__penrose_tmpa_int
+\int_new:N \l__penrose_tmpb_int
+\dim_new:N \l__penrose_xa_dim
+\dim_new:N \l__penrose_ya_dim
+\dim_new:N \l__penrose_xb_dim
+\dim_new:N \l__penrose_yb_dim
+\prop_new:N \l__penrose_tmpa_prop
+\cs_new_nopar:Npn \__penrose_normalise_path:Nn #1#2
{
- \spath_get:nnN {#1} {initial point} \l__penrose_tmpa_tl
+ \group_begin:
+ \spath_initialpoint:Nn \l__penrose_tmpa_tl {#2}
\fp_set:Nn \l__penrose_tmpa_fp {\tl_head:N \l__penrose_tmpa_tl}
\tl_set:Nx \l__penrose_tmpa_tl {\tl_tail:N \l__penrose_tmpa_tl}
\fp_set:Nn \l__penrose_tmpb_fp {\tl_head:N \l__penrose_tmpa_tl}
- \spath_get:nnN {#1} {final point} \l__penrose_tmpa_tl
+ \spath_finalpoint:Nn \l__penrose_tmpa_tl {#2}
\fp_set:Nn \l__penrose_tmpa_fp
{\tl_head:N \l__penrose_tmpa_tl - \l__penrose_tmpa_fp}
\tl_set:Nx \l__penrose_tmpa_tl {\tl_tail:N \l__penrose_tmpa_tl}
@@ -53,11 +79,11 @@
\tl_set:Nx \l__penrose_tmpb_tl
{
{\fp_use:N \l__penrose_tmpa_fp}
- {\fp_use:N \l__penrose_tmpb_fp}
- {\fp_use:N \l__penrose_tmpc_fp}
+ {\fp_use:N \l__penrose_tmpc_fp} % swapped
+ {\fp_use:N \l__penrose_tmpb_fp} % swapped
{\fp_use:N \l__penrose_tmpa_fp}
}
- \spath_get:nnN {#1} {initial point} \l__penrose_tmpa_tl
+ \spath_initialpoint:Nn \l__penrose_tmpa_tl {#2}
\fp_set:Nn \l__penrose_tmpa_fp
{
(-1) * \l__penrose_tmpa_fp * \tl_head:N \l__penrose_tmpa_tl
@@ -72,22 +98,32 @@
{\fp_to_dim:N \l__penrose_tmpa_fp}
{\fp_to_dim:N \l__penrose_tmpb_fp}
}
- \spath_transform:nV {#1} \l__penrose_tmpb_tl
+ \spath_transform:NnV \l__penrose_tmpa_tl {#2} \l__penrose_tmpb_tl
+ \tl_gset_eq:NN \g__penrose_smuggle_tl \l__penrose_tmpa_tl
+ \group_end:
+ \tl_set_eq:NN #1 \g__penrose_smuggle_tl
+ \tl_gclear:N \g__penrose_smuggle_tl
}
+\cs_generate_variant:Nn \__penrose_normalise_path:Nn {NV, cn, cV}
+\cs_new_protected_nopar:Npn \__penrose_normalise_path:N #1
+{
+ \__penrose_normalise_path:NV #1#1
+}
+\cs_generate_variant:Nn \__penrose_normalise_path:N {c}
\NewDocumentCommand \SetPenrosePath { m }
{
\pgfsyssoftpath@getcurrentpath\l__penrose_tmpa_tl
- \spath_clear_new:n {Penrose path #1}
- \spath_put:nnV {Penrose path #1} {path} \l__penrose_tmpa_tl
- \penrose_normalise_path:n {Penrose path #1}
+ \__penrose_normalise_path:N \l__penrose_tmpa_tl
+ \tl_gset_eq:cN {g__penrose_side_#1_tl} \l__penrose_tmpa_tl
}
\cs_new_nopar:Npn \tikz_scan_point:n #1
{
\tikz@scan@one@point\pgfutil@firstofone#1\relax
}
\cs_generate_variant:Nn \tikz_scan_point:n {V}
-\cs_new_nopar:Npn \penrose_make_tile:nnn #1#2#3
+\cs_new_nopar:Npn \__penrose_make_tile:nnn #1#2#3
{
+ \group_begin:
\tl_set:Nn \l__penrose_tmpa_tl {#3}
\tl_set:Nx \l__penrose_tmpb_tl {\tl_head:N \l__penrose_tmpa_tl}
\tl_set:Nn \l__penrose_tmpa_tl {\pgfsyssoftpath@movetotoken}
@@ -96,12 +132,12 @@
{
{\dim_use:N \pgf@x}{\dim_use:N \pgf@y}
}
- \spath_clear_new:n {Penrose path tile #1}
- \spath_put:nnV {Penrose path tile #1} {path} \l__penrose_tmpa_tl
+ \tl_set_eq:NN \l__penrose_tmp_tile_path_tl \l__penrose_tmpa_tl
\tl_set:Nn \l__penrose_tmpa_tl {#3}
\tl_put_right:Nx \l__penrose_tmpa_tl {{\tl_head:N \l__penrose_tmpa_tl}}
\tl_map_inline:nn {#2} {
- \spath_clone:nn {Penrose path ##1} {Penrose path tmpa}
+ \tl_set:Nx \l__penrose_tmpc_tl {\tl_head:n {##1}}
+ \tl_set_eq:Nc \l__penrose_tmpd_tl {g__penrose_side_ \tl_use:N \l__penrose_tmpc_tl _tl}
\tl_set:Nx \l__penrose_tmpb_tl {\tl_head:N \l__penrose_tmpa_tl}
\tl_set:Nx \l__penrose_tmpa_tl {\tl_tail:N \l__penrose_tmpa_tl}
\tikz_scan_point:V \l__penrose_tmpb_tl
@@ -115,24 +151,29 @@
\tl_set:Nx \l__penrose_tmpb_tl
{
{\fp_use:N \l__penrose_tmpa_fp}
- {\fp_use:N \l__penrose_tmpc_fp}
- {\fp_use:N \l__penrose_tmpb_fp}
+ {\fp_use:N \l__penrose_tmpb_fp} % not swapped
+ {\fp_use:N \l__penrose_tmpc_fp} % not swapped
{\fp_use:N \l__penrose_tmpa_fp}
{0}
{0}
}
- \spath_transform:nV {Penrose path tmpa} \l__penrose_tmpb_tl
- \spath_weld:nn {Penrose path tile #1} {Penrose path tmpa}
+ \spath_transform:NV \l__penrose_tmpd_tl \l__penrose_tmpb_tl
+ \spath_weld:NV \l__penrose_tmp_tile_path_tl \l__penrose_tmpd_tl
}
- \spath_close_path:n {Penrose path tile #1}
+ \spath_close:N \l__penrose_tmp_tile_path_tl
+ \tl_gset_eq:NN \g__penrose_smuggle_tl \l__penrose_tmp_tile_path_tl
+ \group_end:
+ \tl_gclear_new:c {g__penrose_tile_#1_tl}
+ \tl_gset_eq:cN {g__penrose_tile_#1_tl} \g__penrose_smuggle_tl
+ \tl_gclear:N \g__penrose_smuggle_tl
}
-\cs_new_nopar:Npn \penrose_make_tile:nn #1#2
+\cs_new_nopar:Npn \__penrose_make_tile:nn #1#2
{
- \penrose_make_tile:nnn {#1} #2
+ \__penrose_make_tile:nnn {#1} #2
}
-\cs_generate_variant:Nn \penrose_make_tile:nn {nV}
+\cs_generate_variant:Nn \__penrose_make_tile:nn {nV}
\prop_new:N \g__penrose_tiles_prop
-\cs_new_nopar:Npn \tl_add_coordinate:Nnn #1#2#3 {
+\cs_new_nopar:Npn \__penrose_add_coordinate:Nnn #1#2#3 {
\fp_set:Nn \l__penrose_tmpa_fp{#2}
\fp_set:Nn \l__penrose_tmpb_fp{#3}
\tl_put_right:Nx #1
@@ -140,192 +181,367 @@
{(\fp_use:N \l__penrose_tmpa_fp, \fp_use:N \l__penrose_tmpb_fp)}
}
}
+\cs_new_nopar:Npn \__penrose_add_coordinate:w #1#2,#3 \q_stop
+{
+ \__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {#2}{#3}
+}
\tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{sind(18)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(18)}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{-sind(18)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{sind(18)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(18)}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{-sind(18)}
\prop_gput:Nnx \g__penrose_tiles_prop {thin~ rhombus}
{{a A B b} {\tl_use:N \l__penrose_tmpa_tl}}
\tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{sind(36)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(36)}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{-sind(36)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{sind(36)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(36)}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{-sind(36)}
\prop_gput:Nnx \g__penrose_tiles_prop {thick~ rhombus}
{{B a A b} {\tl_use:N \l__penrose_tmpa_tl}}
\tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl
{2*sind(18)*cosd(108)}{2*sind(18)*sind(108)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {2*sind(18)}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {2*sind(18)}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl
{2*sind(18)*cosd(108)}{-2*sind(18)*sind(108)}
\prop_gput:Nnx \g__penrose_tiles_prop {dart}
{{c a A C} {\tl_use:N \l__penrose_tmpa_tl}}
\tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{sind(36)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {1}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{-sind(36)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{sind(36)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {1}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{-sind(36)}
\prop_gput:Nnx \g__penrose_tiles_prop {kite}
{{a c C A} {\tl_use:N \l__penrose_tmpa_tl}}
\tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{sind(18)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{-sind(18)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{sind(18)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{-sind(18)}
\prop_gput:Nnx \g__penrose_tiles_prop {golden~ triangle}
{{a c b} {\tl_use:N \l__penrose_tmpa_tl}}
\tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{sind(18)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{-sind(18)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{sind(18)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{-sind(18)}
\prop_gput:Nnx \g__penrose_tiles_prop {reverse~ golden~ triangle}
{{B C A} {\tl_use:N \l__penrose_tmpa_tl}}
\tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{sind(36)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(36)}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{sind(36)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(36)}{0}
\prop_gput:Nnx \g__penrose_tiles_prop {golden~ gnomon}
{{C b A} {\tl_use:N \l__penrose_tmpa_tl}}
\tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(36)}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{-sind(36)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(36)}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(36)}{-sind(36)}
\prop_gput:Nnx \g__penrose_tiles_prop {reverse~ golden~ gnomon}
{{a B c} {\tl_use:N \l__penrose_tmpa_tl}}
\tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(108)}{sind(108)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(108)}{sind(108)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl
{1+cosd(72)+cosd(144)}{sind(72)+sind(144)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {1+cosd(72)}{sind(72)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {1}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {1+cosd(72)}{sind(72)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {1}{0}
\prop_gput:Nnx \g__penrose_tiles_prop {pentagon~ 5}
{{a a a a a} {\tl_use:N \l__penrose_tmpa_tl}}
\prop_gput:Nnx \g__penrose_tiles_prop {pentagon~ 3}
{{A b a a b} {\tl_use:N \l__penrose_tmpa_tl}}
\prop_gput:Nnx \g__penrose_tiles_prop {pentagon~ 2}
-{{d A c c A} {\tl_use:N \l__penrose_tmpa_tl}}
+{{d A e c A} {\tl_use:N \l__penrose_tmpa_tl}}
\tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {1}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {1-cosd(36)}{-sind(36)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {1}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {1-cosd(36)}{-sind(36)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl
{1-cosd(36)-cosd(108)}{-sind(36)-sind(108)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(108)}{-sind(108)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(108)}{-sind(108)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl
{-1+3*cosd(108)+cosd(36)}{-sind(36)-sind(108)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl
{-1+2*cosd(108)+cosd(36)}{-sind(36)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {-1+2*cosd(108)}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(108)}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(108)}{sind(108)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {-1+2*cosd(108)}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(108)}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(108)}{sind(108)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
\prop_gput:Nnx \g__penrose_tiles_prop {pentagram}
-{{C C C C C C C C C C} {\tl_use:N \l__penrose_tmpa_tl}}
+{{C E C E C E C E C E} {\tl_use:N \l__penrose_tmpa_tl}}
\tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {-1+2*cosd(108)}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(108)}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(108)}{sind(108)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {1}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {1-cosd(36)}{-sind(36)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {-1+2*cosd(108)}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(108)}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(108)}{sind(108)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {1}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {1-cosd(36)}{-sind(36)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl
{-1+2*cosd(108)+cosd(36)}{-sind(36)}
\prop_gput:Nnx \g__penrose_tiles_prop {boat}
-{{C C C C B D B} {\tl_use:N \l__penrose_tmpa_tl}}
+{{C E C E B D B} {\tl_use:N \l__penrose_tmpa_tl}}
\tl_clear:N \l__penrose_tmpa_tl
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{sind(18)}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(18)}{0}
-\tl_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{-sind(18)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {0}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{sind(18)}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {2*cosd(18)}{0}
+\__penrose_add_coordinate:Nnn \l__penrose_tmpa_tl {cosd(18)}{-sind(18)}
\prop_gput:Nnx \g__penrose_tiles_prop {diamond}
{{D B B D} {\tl_use:N \l__penrose_tmpa_tl}}
-\NewDocumentCommand \MakePenroseTile {m}
+\NewDocumentCommand \BakePenroseTile {m}
{
\prop_get:NnN \g__penrose_tiles_prop {#1} \l__penrose_tmpa_tl
- \penrose_make_tile:nV {#1} \l__penrose_tmpa_tl
+ \__penrose_make_tile:nV {#1} \l__penrose_tmpa_tl
}
+\cs_set_eq:NN \MakePenroseTile \BakePenroseTile
\NewDocumentCommand \UsePenroseTile {O{} m}
{
- \spath_clone:nn {Penrose path tile #2} {Penrose path tmpa}
+ \tl_set_eq:Nc \l__penrose_tmp_tile_path_tl {g__penrose_tile_#2_tl}
\pgfgettransform \l__penrose_tmpa_tl
- \tl_clear:N \l__penrose_tmpb_tl
- \tl_set:Nx \l__penrose_tmpb_tl {{\tl_head:N \l__penrose_tmpa_tl}}
- \tl_set:Nx \l__penrose_tmpa_tl {\tl_tail:N \l__penrose_tmpa_tl}
- \tl_put_right:Nx \l__penrose_tmpb_tl
- {
- {\tl_item:Nn \l__penrose_tmpa_tl {2}}
- }
- \tl_put_right:Nx \l__penrose_tmpb_tl
- {
- {\tl_item:Nn \l__penrose_tmpa_tl {1}}
- }
- \tl_set:Nx \l__penrose_tmpa_tl {\tl_tail:N \l__penrose_tmpa_tl}
- \tl_set:Nx \l__penrose_tmpa_tl {\tl_tail:N \l__penrose_tmpa_tl}
- \tl_put_right:NV \l__penrose_tmpb_tl \l__penrose_tmpa_tl
- \spath_transform:nV {Penrose path tmpa} \l__penrose_tmpb_tl
- \spath_protocol_path:n {Penrose path tmpa}
- \spath_tikz_path:nn {#1}{Penrose path tmpa}
+ \spath_transform:NV \l__penrose_tmp_tile_path_tl \l__penrose_tmpa_tl
+ \spath_tikz_path:nV {#1} \l__penrose_tmp_tile_path_tl
}
\tikzset{
save~ Penrose~ path/.code={
\tikz@addmode{
\pgfsyssoftpath@getcurrentpath\l__penrose_tmpa_tl
- \spath_clear_new:n {Penrose path #1}
- \spath_put:nnV {Penrose path #1} {path} \l__penrose_tmpa_tl
- \penrose_normalise_path:n {Penrose path #1}
- \tex_uppercase:D {\tl_set:Nx \l__penrose_tmpa_tl {#1}}
- \spath_clone:nn {Penrose path #1}
- {Penrose path \tl_use:N \l__penrose_tmpa_tl }
- \spath_reverse:n {Penrose path \tl_use:N \l__penrose_tmpa_tl}
- \spath_transform:nnnnnnn {Penrose path \tl_use:N \l__penrose_tmpa_tl}
- {-1} {0} {0} {-1} {1} {0}
+ \__penrose_normalise_path:N \l__penrose_tmpa_tl
+ \tl_gclear_new:c {g__penrose_side_#1_tl}
+ \tl_gset_eq:cN {g__penrose_side_#1_tl} \l__penrose_tmpa_tl
+ \tl_set:Nx \l__penrose_tmpb_tl {\str_uppercase:n {#1}}
+ \spath_reverse:N \l__penrose_tmpa_tl
+ \spath_transform:Nnnnnnn \l__penrose_tmpa_tl {-1} {0} {0} {-1} {1} {0}
+ \tl_gclear_new:c {g__penrose_side_ \tl_use:N \l__penrose_tmpb_tl _tl}
+ \tl_gset_eq:cN {g__penrose_side_ \tl_use:N \l__penrose_tmpb_tl _tl} \l__penrose_tmpa_tl
}
},
+ clone~ Penrose~ side~ path/.style~ 2~ args={
+ spath/set~ name=Penrose~side,
+ spath/clone~ global={#1}{#2}
+ },
+ spath/prefix/Penrose~side/.style={
+ spath/set~ prefix=g__penrose_side_,
+ },
+ spath/suffix/Penrose~side/.style={
+ spath/set~ suffix=_tl,
+ },
+ clone~ Penrose~ tile~ path/.style~ 2~ args={
+ spath/set~ name=Penrose~tile,
+ spath/clone~ global={#1}{#2}
+ },
+ spath/prefix/Penrose~tile/.style={
+ spath/set~ prefix=g__penrose_tile_,
+ },
+ spath/suffix/Penrose~tile/.style={
+ spath/set~ suffix=_tl,
+ },
expand~ key/.code={
\exp_args:NV \pgfkeysalso #1
}
}
-\MakePenroseTile {thin~ rhombus}
-\MakePenroseTile {thick~ rhombus}
-\MakePenroseTile {dart}
-\MakePenroseTile {kite}
-\MakePenroseTile {golden~ triangle}
-\MakePenroseTile {reverse~ golden~ triangle}
-\MakePenroseTile {golden~ gnomon}
-\MakePenroseTile {reverse~ golden~ gnomon}
-\MakePenroseTile {pentagon~ 5}
-\MakePenroseTile {pentagon~ 3}
-\MakePenroseTile {pentagon~ 2}
-\MakePenroseTile {pentagram}
-\MakePenroseTile {boat}
-\MakePenroseTile {diamond}
+\BakePenroseTile {thin~ rhombus}
+\BakePenroseTile {thick~ rhombus}
+\BakePenroseTile {dart}
+\BakePenroseTile {kite}
+\BakePenroseTile {golden~ triangle}
+\BakePenroseTile {reverse~ golden~ triangle}
+\BakePenroseTile {golden~ gnomon}
+\BakePenroseTile {reverse~ golden~ gnomon}
+\BakePenroseTile {pentagon~ 5}
+\BakePenroseTile {pentagon~ 3}
+\BakePenroseTile {pentagon~ 2}
+\BakePenroseTile {pentagram}
+\BakePenroseTile {boat}
+\BakePenroseTile {diamond}
+\cs_new_nopar:Npn \__penrose_transform_side:nn #1#2
+{
+ \prop_get:NnN \g__penrose_tiles_prop {#1} \l__penrose_tmpa_tl
+ \int_zero:N \l__penrose_tmpb_int
+ \int_incr:N \l__penrose_tmpb_int
+ \tl_set:Nx \l__penrose_tmpc_tl {\tl_head:N \l__penrose_tmpa_tl}
+ \tl_map_inline:Nn \l__penrose_tmpc_tl {
+ \str_if_eq:nnT {##1} {#2} {
+ \tl_map_break:
+ }
+ \int_incr:N \l__penrose_tmpb_int
+ }
+ \tl_set:Nx \l__penrose_tmpc_tl {\tl_tail:N \l__penrose_tmpa_tl}
+ \tl_set:Nx \l__penrose_tmpc_tl {\tl_item:Nn \l__penrose_tmpc_tl {1}}
+ \tl_put_right:Nx \l__penrose_tmpc_tl
+ {{\tl_item:Nn \l__penrose_tmpc_tl {1}}}
+ \tl_set:Nx \l__penrose_tmpa_tl
+ {\tl_item:Nn \l__penrose_tmpc_tl {\int_use:N \l__penrose_tmpb_int}}
+ \tl_set:Nx \l__penrose_tmpb_tl
+ {\tl_item:Nn \l__penrose_tmpc_tl {\int_use:N \l__penrose_tmpb_int + 1}}
+ \tikz_scan_point:V \l__penrose_tmpb_tl
+ \dim_set_eq:Nc \l__penrose_xa_dim {pgf@x}
+ \dim_set_eq:Nc \l__penrose_ya_dim {pgf@y}
+ \tikz_scan_point:V \l__penrose_tmpa_tl
+ \dim_set_eq:Nc \l__penrose_xb_dim {pgf@x}
+ \dim_set_eq:Nc \l__penrose_yb_dim {pgf@y}
+
+ \dim_sub:Nn \l__penrose_xb_dim {\l__penrose_xa_dim }
+ \dim_sub:Nn \l__penrose_yb_dim {\l__penrose_ya_dim }
+ \pgfpointnormalised{\pgfpoint{\l__penrose_xb_dim}{\l__penrose_yb_dim}}
+ \dim_set_eq:Nc \l__penrose_xb_dim {pgf@x}
+ \dim_set_eq:Nc \l__penrose_yb_dim {pgf@y}
+ \pgftransformtriangle%
+ {\pgfpoint{0pt}{0pt}}%
+ {\pgfpoint{\l__penrose_xb_dim}{-\l__penrose_yb_dim}}
+ {\pgfpoint{\l__penrose_yb_dim}{\l__penrose_xb_dim}}
+
+ \pgftransformshift{\pgfpoint{-\l__penrose_xa_dim}{-\l__penrose_ya_dim}}
+
+}
+\cs_generate_variant:Nn \tl_if_eq:nnT {nVT}
+\cs_generate_variant:Nn \__penrose_transform_side:nn {nx,nV}
+\DeclareDocumentCommand \TransformAlongSide {m m}
+{
+ \__penrose_transform_side:nx {#1}{#2}
+}
+\cs_new_nopar:Npn \__penrose_coordinates_at_vertices:n #1
+{
+ \prop_get:NnN \g__penrose_tiles_prop {#1} \l__penrose_tmpa_tl
+ \tl_set:Nx \l__penrose_tmpb_tl {\tl_head:N \l__penrose_tmpa_tl}
+ \tl_set:Nx \l__penrose_tmpc_tl {\tl_tail:N \l__penrose_tmpa_tl}
+ \tl_set:Nx \l__penrose_tmpc_tl
+ {\tl_item:Nn \l__penrose_tmpc_tl {1}}
+ \tl_put_right:Nx \l__penrose_tmpc_tl
+ {{\tl_item:Nn \l__penrose_tmpc_tl {1}}}
+ \tl_set:Nx \l__penrose_tmpa_tl {\tl_head:N \l__penrose_tmpc_tl}
+ \tl_set:Nx \l__penrose_tmpc_tl {\tl_tail:N \l__penrose_tmpc_tl}
+ \tl_map_inline:Nn \l__penrose_tmpb_tl {
+ \tl_set:Nx \l__penrose_tmpd_tl {
+ \exp_not:N \coordinate
+ (-edge~ ##1~ start)~ at \tl_use:N \l__penrose_tmpa_tl;
+ }
+ \tl_use:N \l__penrose_tmpd_tl
+ \tl_set:Nx \l__penrose_tmpa_tl {\tl_head:N \l__penrose_tmpc_tl}
+ \tl_set:Nx \l__penrose_tmpc_tl {\tl_tail:N \l__penrose_tmpc_tl}
+ \tl_set:Nx \l__penrose_tmpd_tl {
+ \exp_not:N \coordinate
+ (-edge~ ##1~ end)~ at \tl_use:N \l__penrose_tmpa_tl;
+ }
+ \tl_use:N \l__penrose_tmpd_tl
+ }
+}
+\DeclareDocumentCommand \CoordinatesAtVertices {m}
+{
+ \__penrose_coordinates_at_vertices:n {#1}
+}
+\DeclareDocumentCommand \DefineTile { m m m }
+{
+ \tl_clear:N \l__penrose_tmpa_tl
+ \tl_map_inline:nn {#3} {
+ \__penrose_add_coordinate:w \l__penrose_tmpa_tl ##1 \q_stop
+ }
+ \prop_clear:N \l__penrose_tmpa_prop
+ \tl_map_inline:nn {#2} {
+ \prop_if_in:NnTF \l__penrose_tmpa_prop {##1}
+ {
+ \prop_put:Nnn \l__penrose_tmpa_prop {##1} {1}
+ }
+ {
+ \prop_put:Nnn \l__penrose_tmpa_prop {##1} {0}
+ }
+ }
+ \tl_clear:N \l__penrose_tmpb_tl
+ \tl_map_inline:nn {#2}
+ {
+ \tl_clear:N \l__penrose_tmpc_tl
+ \tl_put_right:Nn \l__penrose_tmpc_tl {##1}
+ \int_compare:nF {\prop_item:Nn \l__penrose_tmpa_prop {##1} == 0} {
+ \tl_put_right:Nx \l__penrose_tmpc_tl
+ {\prop_item:Nn \l__penrose_tmpa_prop {##1}}
+ \prop_put:Nnx \l__penrose_tmpa_prop {##1}
+ {\int_eval:n {\prop_item:Nn \l__penrose_tmpa_prop {##1} + 1}}
+ }
+ \tl_put_right:Nx \l__penrose_tmpb_tl {{ \l__penrose_tmpc_tl }}
+ }
+ \prop_gput:Nnx \g__penrose_tiles_prop {#1}
+ {{\tl_use:N \l__penrose_tmpb_tl} {\tl_use:N \l__penrose_tmpa_tl}}
+ \tikzset{
+ #1/.pic={
+ \begin{scope}
+ \pgfkeysgetvalue{/tikz/Penrose/alignment~ location}{\prloc}
+ \ifx\prloc\pgfutil@empty
+ \else
+ \begingroup
+ \tikzset{name~ prefix~ ..}%
+ \tikz@scan@one@point\pgfutil@firstofone%
+ (\prloc-edge~ \pgfkeysvalueof{/tikz/Penrose/alignment~ edge}~ start)%
+ \global\pgf@xa=\pgf@x
+ \global\pgf@ya=\pgf@y
+ \tikz@scan@one@point\pgfutil@firstofone%
+ (\prloc-edge~ \pgfkeysvalueof{/tikz/Penrose/alignment~ edge}~ end)%
+ \global\pgf@xb=\pgf@x
+ \global\pgf@yb=\pgf@y
+ \endgroup
+ \advance\pgf@xb by -\pgf@xa
+ \advance\pgf@yb by -\pgf@ya
+ \pgftransformshift{\pgfpoint{\pgf@xa}{\pgf@ya}}%
+ \pgfpointnormalised{\pgfpoint{\pgf@xb}{\pgf@yb}}
+ \pgf@xb=\pgf@x
+ \pgf@yb=\pgf@y
+ \pgftransformtriangle%
+ {\pgfpoint{0pt}{0pt}}%
+ {\pgfpoint{\pgf@xb}{\pgf@yb}}%
+ {\pgfpoint{-\pgf@yb}{\pgf@xb}}
+ \str_set:Nx \l__penrose_tmpa_str
+ {\pgfkeysvalueof{/tikz/Penrose/alignment~ edge}}
+ \str_set:Nx \l__penrose_tmpa_str {\str_head:N \l__penrose_tmpa_str}
+ \str_put_right:Nx \l__penrose_tmpa_str
+ {\pgfkeysvalueof{/tikz/Penrose/alignment~ new~ edge}}
+ \str_set:Nx \l__penrose_tmpb_str {\str_lowercase:f { \l__penrose_tmpa_str}}
+ \str_if_eq:NNT \l__penrose_tmpa_str \l__penrose_tmpb_str
+ {
+ \str_set:Nx \l__penrose_tmpb_str
+ {\str_uppercase:f { \l__penrose_tmpa_str}}
+ }
+
+ \__penrose_transform_side:nV {#1} \l__penrose_tmpb_str
+ \fi
+ \UsePenroseTile[
+ every~ Penrose~ tile~ clip/.try,
+ every~ #1~ clip/.try
+ ]{#1}
+ \UsePenroseTile[
+ every~ Penrose~ tile/.try,
+ every~ #1/.try,
+ pic~ actions
+ ]{#1}
+ \__penrose_coordinates_at_vertices:n {#1}
+ \end{scope}
+ },
+ #1/.style={
+ every~ Penrose~ pic/.try,
+ pic~ type=#1,
+ },
+ }
+}
\prop_new:N \g__penrose_rhombus_lms_rule_prop
-\prop_put:Nnn \g__penrose_rhombus_lms_rule_prop {T} {[f*sT][f>g]}
-\prop_put:Nnn \g__penrose_rhombus_lms_rule_prop {t} {[f_st][f>G]}
-\prop_put:Nnn \g__penrose_rhombus_lms_rule_prop {G} {[f+sG][sf>g][sf*sT]}
-\prop_put:Nnn \g__penrose_rhombus_lms_rule_prop {g} {[f-sg][sf>G][sf_st]}
+\prop_gput:Nnn \g__penrose_rhombus_lms_rule_prop {T} {[f*sT][f>g]}
+\prop_gput:Nnn \g__penrose_rhombus_lms_rule_prop {t} {[f_st][f>G]}
+\prop_gput:Nnn \g__penrose_rhombus_lms_rule_prop {G} {[f+sG][sf>g][sf*sT]}
+\prop_gput:Nnn \g__penrose_rhombus_lms_rule_prop {g} {[f-sg][sf>G][sf_st]}
\prop_new:N \g__penrose_kite_lms_rule_prop
-\prop_put:Nnn \g__penrose_kite_lms_rule_prop {T} {[f*sT][f>st][+sg]}
-\prop_put:Nnn \g__penrose_kite_lms_rule_prop {t} {[f_st][f>sT][-sG]}
-\prop_put:Nnn \g__penrose_kite_lms_rule_prop {G} {[f*+sG][sT]}
-\prop_put:Nnn \g__penrose_kite_lms_rule_prop {g} {[f-_sg][st]}
+\prop_gput:Nnn \g__penrose_kite_lms_rule_prop {T} {[f*sT][f>st][+sg]}
+\prop_gput:Nnn \g__penrose_kite_lms_rule_prop {t} {[f_st][f>sT][-sG]}
+\prop_gput:Nnn \g__penrose_kite_lms_rule_prop {G} {[f*+sG][sT]}
+\prop_gput:Nnn \g__penrose_kite_lms_rule_prop {g} {[f-_sg][st]}
\prop_new:N \g__penrose_pentagon_lms_rule_prop
-\prop_put:Nnn \g__penrose_pentagon_lms_rule_prop {P}
+\prop_gput:Nnn \g__penrose_pentagon_lms_rule_prop {P}
{[s>P][1sF+Q][1+sF+Q][1*sF+Q][1-sF+Q][1_sF+Q]} % pentagon 5
-\prop_put:Nnn \g__penrose_pentagon_lms_rule_prop {Q}
+\prop_gput:Nnn \g__penrose_pentagon_lms_rule_prop {Q}
{[s>P][1+sFR][1*sF*R][1-sF+Q][1_sF+Q][1sF+Q][->fsD]} % pentagon 3
-\prop_put:Nnn \g__penrose_pentagon_lms_rule_prop {R}
+\prop_gput:Nnn \g__penrose_pentagon_lms_rule_prop {R}
{[s>P][1-sF+Q][1+sF*R][1*sFR][1_sF*R][1sFR][_>fsD][>fsD]} % pentagon 2
-\prop_put:Nnn \g__penrose_pentagon_lms_rule_prop {G}
+\prop_gput:Nnn \g__penrose_pentagon_lms_rule_prop {G}
{
[s>G]
[se[>d+R][e1B]]
@@ -334,18 +550,18 @@
[*se[>d+R][e1B]]
[_se[>d+R][e1B]]
} % pentagram
-\prop_put:Nnn \g__penrose_pentagon_lms_rule_prop {B}
+\prop_gput:Nnn \g__penrose_pentagon_lms_rule_prop {B}
{
[s>G]
[se[>d+R][e1B]]
[+se[>d+R][e1B]]
[-se[>d+R][e1B]]
} % boat
-\prop_put:Nnn \g__penrose_pentagon_lms_rule_prop {D}
+\prop_gput:Nnn \g__penrose_pentagon_lms_rule_prop {D}
{[s>d+R][s>eG][se1B]} % diamond
-\prop_set_eq:NN \g__penrose_rtriangle_lms_rule_prop
+\prop_gset_eq:NN \g__penrose_rtriangle_lms_rule_prop
\g__penrose_rhombus_lms_rule_prop
-\prop_set_eq:NN \g__penrose_ktriangle_lms_rule_prop
+\prop_gset_eq:NN \g__penrose_ktriangle_lms_rule_prop
\g__penrose_kite_lms_rule_prop
\prop_new:N \g__penrose_default_lms_action_prop
\prop_new:N \g__penrose_rhombus_lms_action_prop
@@ -355,29 +571,29 @@
\prop_new:N \g__penrose_pentagon_lms_action_prop
\dim_new:N \l__penrose_step_dim
\dim_set:Nn \l__penrose_step_dim {1cm}
-\prop_put:Nnn \g__penrose_default_lms_action_prop {[} {\group_begin:}
-\prop_put:Nnn \g__penrose_default_lms_action_prop {]} {\group_end:}
-\prop_put:Nnn \g__penrose_default_lms_action_prop {f}
+\prop_gput:Nnn \g__penrose_default_lms_action_prop {[} {\group_begin:}
+\prop_gput:Nnn \g__penrose_default_lms_action_prop {]} {\group_end:}
+\prop_gput:Nnn \g__penrose_default_lms_action_prop {f}
{\pgftransformxshift{\l__penrose_step_dim}}
-\prop_put:Nnn \g__penrose_default_lms_action_prop {s} {
+\prop_gput:Nnn \g__penrose_default_lms_action_prop {s} {
\fp_set:Nn \l__penrose_tmpa_fp { 2 * sind(18) * \l__penrose_step_dim }
\dim_set:Nn \l__penrose_step_dim {\fp_to_dim:N \l__penrose_tmpa_fp}
}
-\prop_put:Nnn \g__penrose_rhombus_lms_action_prop {+}
+\prop_gput:Nnn \g__penrose_rhombus_lms_action_prop {+}
{\pgftransformrotate{144}}
-\prop_put:Nnn \g__penrose_rhombus_lms_action_prop {*}
+\prop_gput:Nnn \g__penrose_rhombus_lms_action_prop {*}
{\pgftransformrotate{108}}
-\prop_put:Nnn \g__penrose_rhombus_lms_action_prop {-}
+\prop_gput:Nnn \g__penrose_rhombus_lms_action_prop {-}
{\pgftransformrotate{216}}
-\prop_put:Nnn \g__penrose_rhombus_lms_action_prop {_}
+\prop_gput:Nnn \g__penrose_rhombus_lms_action_prop {_}
{\pgftransformrotate{252}}
-\prop_put:Nnn \g__penrose_rhombus_lms_action_prop {>}
+\prop_gput:Nnn \g__penrose_rhombus_lms_action_prop {>}
{\pgftransformrotate{180}}
-\prop_set_eq:NN \g__penrose_rtriangle_lms_action_prop
+\prop_gset_eq:NN \g__penrose_rtriangle_lms_action_prop
\g__penrose_rhombus_lms_action_prop
-\prop_put:Nnn \g__penrose_rhombus_lms_action_prop {T} {
+\prop_gput:Nnn \g__penrose_rhombus_lms_action_prop {T} {
\group_begin:
- \int_gincr:N \l__penrose_tile_int
+ \int_gincr:N \g__penrose_tile_int
\pgftransformrotate{198}
\fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim*2*cosd(18)}
\pgftransformxshift{-\fp_to_dim:N \l__penrose_tmpa_fp}
@@ -385,239 +601,239 @@
\pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
\tl_set:Nx \l__penrose_tmpc_tl
{
- {\int_use:N \l__penrose_tile_int}
- {\int_use:N \l__penrose_tiles_int}
+ {\int_use:N \g__penrose_tile_int}
+ {\int_use:N \g__penrose_tiles_int}
}
\UsePenroseTile[
every~ Penrose~ tile/.try,
every~ thin~ rhombus/.try,
- Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+ Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
]{thin~rhombus}
\group_end:
}
-\prop_put:Nnn \g__penrose_rhombus_lms_action_prop {G} {
+\prop_gput:Nnn \g__penrose_rhombus_lms_action_prop {G} {
\group_begin:
- \int_gincr:N \l__penrose_tile_int
+ \int_gincr:N \g__penrose_tile_int
\fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)/(2*cosd(36))}
\pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
\tl_set:Nx \l__penrose_tmpc_tl
{
- {\int_use:N \l__penrose_tile_int}
- {\int_use:N \l__penrose_tiles_int}
+ {\int_use:N \g__penrose_tile_int}
+ {\int_use:N \g__penrose_tiles_int}
}
\UsePenroseTile[
every~ Penrose~ tile/.try,
every~ thick~ rhombus/.try,
- Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+ Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
]{thick~rhombus}
\group_end:
}
-\prop_put:Nnn \g__penrose_kite_lms_action_prop {+} {\pgftransformrotate{36}}
-\prop_put:Nnn \g__penrose_kite_lms_action_prop {*} {\pgftransformrotate{108}}
-\prop_put:Nnn \g__penrose_kite_lms_action_prop {-} {\pgftransformrotate{-36}}
-\prop_put:Nnn \g__penrose_kite_lms_action_prop {_}
+\prop_gput:Nnn \g__penrose_kite_lms_action_prop {+} {\pgftransformrotate{36}}
+\prop_gput:Nnn \g__penrose_kite_lms_action_prop {*} {\pgftransformrotate{108}}
+\prop_gput:Nnn \g__penrose_kite_lms_action_prop {-} {\pgftransformrotate{-36}}
+\prop_gput:Nnn \g__penrose_kite_lms_action_prop {_}
{\pgftransformrotate{-108}}
-\prop_put:Nnn \g__penrose_kite_lms_action_prop {>} {\pgftransformrotate{180}}
-\prop_set_eq:NN \g__penrose_ktriangle_lms_action_prop
+\prop_gput:Nnn \g__penrose_kite_lms_action_prop {>} {\pgftransformrotate{180}}
+\prop_gset_eq:NN \g__penrose_ktriangle_lms_action_prop
\g__penrose_kite_lms_action_prop
-\prop_put:Nnn \g__penrose_kite_lms_action_prop {T} {
+\prop_gput:Nnn \g__penrose_kite_lms_action_prop {T} {
\group_begin:
- \int_gincr:N \l__penrose_tile_int
+ \int_gincr:N \g__penrose_tile_int
\pgftransformrotate{36}
\fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)}
\pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
\tl_set:Nx \l__penrose_tmpc_tl
{
- {\int_use:N \l__penrose_tile_int}
- {\int_use:N \l__penrose_tiles_int}
+ {\int_use:N \g__penrose_tile_int}
+ {\int_use:N \g__penrose_tiles_int}
}
\UsePenroseTile[
every~ Penrose~ tile/.try,
every~ kite/.try,
- Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+ Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
]{kite}
\group_end:
}
-\prop_put:Nnn \g__penrose_kite_lms_action_prop {g} {
+\prop_gput:Nnn \g__penrose_kite_lms_action_prop {g} {
\group_begin:
- \int_gincr:N \l__penrose_tile_int
+ \int_gincr:N \g__penrose_tile_int
\pgftransformrotate{144}
\pgftransformxshift{-\l__penrose_step_dim * 2 * sin(18)}
\fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)}
\pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
\tl_set:Nx \l__penrose_tmpc_tl
{
- {\int_use:N \l__penrose_tile_int}
- {\int_use:N \l__penrose_tiles_int}
+ {\int_use:N \g__penrose_tile_int}
+ {\int_use:N \g__penrose_tiles_int}
}
\UsePenroseTile[
every~ Penrose~ tile/.try,
every~ dart/.try,
- Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+ Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
]{dart}
\group_end:
}
-\prop_put:Nnn \g__penrose_rtriangle_lms_action_prop {T} {
+\prop_gput:Nnn \g__penrose_rtriangle_lms_action_prop {T} {
\group_begin:
- \int_gincr:N \l__penrose_tile_int
+ \int_gincr:N \g__penrose_tile_int
\pgftransformrotate{18}
\fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)}
\pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
\tl_set:Nx \l__penrose_tmpc_tl
{
- {\int_use:N \l__penrose_tile_int}
- {\int_use:N \l__penrose_tiles_int}
+ {\int_use:N \g__penrose_tile_int}
+ {\int_use:N \g__penrose_tiles_int}
}
\UsePenroseTile[
every~ Penrose~ tile/.try,
every~ reverse~ golden~ triangle/.try,
- Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+ Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
]{reverse~ golden~ triangle}
\group_end:
}
-\prop_put:Nnn \g__penrose_rtriangle_lms_action_prop {t} {
+\prop_gput:Nnn \g__penrose_rtriangle_lms_action_prop {t} {
\group_begin:
- \int_gincr:N \l__penrose_tile_int
+ \int_gincr:N \g__penrose_tile_int
\pgftransformrotate{-18}
\fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)}
\pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
\tl_set:Nx \l__penrose_tmpc_tl
{
- {\int_use:N \l__penrose_tile_int}
- {\int_use:N \l__penrose_tiles_int}
+ {\int_use:N \g__penrose_tile_int}
+ {\int_use:N \g__penrose_tiles_int}
}
\tl_set:Nx \l__penrose_tmpc_tl
{
- {\int_use:N \l__penrose_tile_int}
- {\int_use:N \l__penrose_tiles_int}
+ {\int_use:N \g__penrose_tile_int}
+ {\int_use:N \g__penrose_tiles_int}
}
\UsePenroseTile[
every~ Penrose~ tile/.try,
every~ golden~ triangle/.try,
- Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+ Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
]{golden~ triangle}
\group_end:
}
-\prop_put:Nnn \g__penrose_rtriangle_lms_action_prop {G} {
+\prop_gput:Nnn \g__penrose_rtriangle_lms_action_prop {G} {
\group_begin:
- \int_gincr:N \l__penrose_tile_int
+ \int_gincr:N \g__penrose_tile_int
\pgftransformrotate{180}
\pgftransformxshift{-\l__penrose_step_dim}
\fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)/(2*cosd(36))}
\pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
\tl_set:Nx \l__penrose_tmpc_tl
{
- {\int_use:N \l__penrose_tile_int}
- {\int_use:N \l__penrose_tiles_int}
+ {\int_use:N \g__penrose_tile_int}
+ {\int_use:N \g__penrose_tiles_int}
}
\UsePenroseTile[
every~ Penrose~ tile/.try,
every~ reverse~ golden~ gnomon/.try,
- Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+ Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
]{reverse~ golden~ gnomon}
\group_end:
}
-\prop_put:Nnn \g__penrose_rtriangle_lms_action_prop {g} {
+\prop_gput:Nnn \g__penrose_rtriangle_lms_action_prop {g} {
\group_begin:
- \int_gincr:N \l__penrose_tile_int
+ \int_gincr:N \g__penrose_tile_int
\pgftransformrotate{180}
\pgftransformxshift{-\l__penrose_step_dim}
\fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)/(2*cosd(36))}
\pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
\tl_set:Nx \l__penrose_tmpc_tl
{
- {\int_use:N \l__penrose_tile_int}
- {\int_use:N \l__penrose_tiles_int}
+ {\int_use:N \g__penrose_tile_int}
+ {\int_use:N \g__penrose_tiles_int}
}
\UsePenroseTile[
every~ Penrose~ tile/.try,
every~ golden~ gnomon/.try,
- Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+ Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
]{golden~ gnomon}
\group_end:
}
-\prop_put:Nnn \g__penrose_ktriangle_lms_action_prop {T} {
+\prop_gput:Nnn \g__penrose_ktriangle_lms_action_prop {T} {
\group_begin:
- \int_gincr:N \l__penrose_tile_int
+ \int_gincr:N \g__penrose_tile_int
\pgftransformrotate{18}
\fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)}
\pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
\tl_set:Nx \l__penrose_tmpc_tl
{
- {\int_use:N \l__penrose_tile_int}
- {\int_use:N \l__penrose_tiles_int}
+ {\int_use:N \g__penrose_tile_int}
+ {\int_use:N \g__penrose_tiles_int}
}
\UsePenroseTile[
every~ Penrose~ tile/.try,
every~ reverse~ golden~ triangle/.try,
- Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+ Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
]{reverse~ golden~ triangle}
\group_end:
}
-\prop_put:Nnn \g__penrose_ktriangle_lms_action_prop {t} {
+\prop_gput:Nnn \g__penrose_ktriangle_lms_action_prop {t} {
\group_begin:
- \int_gincr:N \l__penrose_tile_int
+ \int_gincr:N \g__penrose_tile_int
\pgftransformrotate{-18}
\fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)}
\pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
\tl_set:Nx \l__penrose_tmpc_tl
{
- {\int_use:N \l__penrose_tile_int}
- {\int_use:N \l__penrose_tiles_int}
+ {\int_use:N \g__penrose_tile_int}
+ {\int_use:N \g__penrose_tiles_int}
}
\UsePenroseTile[
every~ Penrose~ tile/.try,
every~ golden~ triangle/.try,
- Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+ Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
]{golden~ triangle}
\group_end:
}
-\prop_put:Nnn \g__penrose_ktriangle_lms_action_prop {G} {
+\prop_gput:Nnn \g__penrose_ktriangle_lms_action_prop {G} {
\group_begin:
- \int_gincr:N \l__penrose_tile_int
+ \int_gincr:N \g__penrose_tile_int
\pgftransformrotate{180}
\pgftransformxshift{-\l__penrose_step_dim}
\fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)/(2*cosd(36))}
\pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
\tl_set:Nx \l__penrose_tmpc_tl
{
- {\int_use:N \l__penrose_tile_int}
- {\int_use:N \l__penrose_tiles_int}
+ {\int_use:N \g__penrose_tile_int}
+ {\int_use:N \g__penrose_tiles_int}
}
\UsePenroseTile[
every~ Penrose~ tile/.try,
every~ reverse~ golden~ gnomon/.try,
- Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+ Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
]{reverse~ golden~ gnomon}
\group_end:
}
-\prop_put:Nnn \g__penrose_ktriangle_lms_action_prop {g} {
+\prop_gput:Nnn \g__penrose_ktriangle_lms_action_prop {g} {
\group_begin:
- \int_gincr:N \l__penrose_tile_int
+ \int_gincr:N \g__penrose_tile_int
\pgftransformrotate{180}
\pgftransformxshift{-\l__penrose_step_dim}
\fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/(1cm)/(2*cosd(36))}
\pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
\tl_set:Nx \l__penrose_tmpc_tl
{
- {\int_use:N \l__penrose_tile_int}
- {\int_use:N \l__penrose_tiles_int}
+ {\int_use:N \g__penrose_tile_int}
+ {\int_use:N \g__penrose_tiles_int}
}
\UsePenroseTile[
every~ Penrose~ tile/.try,
every~ golden~ gnomon/.try,
- Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+ Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
]{golden~ gnomon}
\group_end:
@@ -625,54 +841,54 @@
\int_new:N \l__penrose_pentagon_parity_int
\seq_new:N \l__penrose_pentagon_parity_seq
\seq_set_from_clist:Nn \l__penrose_pentagon_parity_seq {odd,even}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {1} {
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {1} {
\int_set:Nn \l__penrose_pentagon_parity_int
{3 - \l__penrose_pentagon_parity_int}
}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {+}
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {+}
{\pgftransformrotate{72}}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {*}
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {*}
{\pgftransformrotate{144}}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {-}
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {-}
{\pgftransformrotate{288}}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {_}
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {_}
{\pgftransformrotate{216}}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {>}
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {>}
{\pgftransformrotate{180}}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {|}
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {|}
{\pgftransformxscale{-1}}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {s} {
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {s} {
\fp_set:Nn \l__penrose_tmpa_fp
{
1/(2 + 2 * cosd(72) ) * \l__penrose_step_dim
}
\dim_set:Nn \l__penrose_step_dim {\fp_to_dim:N \l__penrose_tmpa_fp}
}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {f} {
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {f} {
\fp_set:Nn \l__penrose_tmpa_fp { tand(54)/2 * \l__penrose_step_dim }
\pgftransformyshift{\fp_to_dim:N \l__penrose_tmpa_fp}
}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {F} {
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {F} {
\fp_set:Nn \l__penrose_tmpa_fp { tand(54) * \l__penrose_step_dim }
\pgftransformyshift{\fp_to_dim:N \l__penrose_tmpa_fp}
}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {d} {
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {d} {
\fp_set:Nn \l__penrose_tmpa_fp
{
(tand(54)/2 - tand(72)/2 + sind(36) ) * \l__penrose_step_dim
}
\pgftransformyshift{\fp_to_dim:N \l__penrose_tmpa_fp}
}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {e} {
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {e} {
\fp_set:Nn \l__penrose_tmpa_fp
{
tand(54) * cosd(36) * \l__penrose_step_dim
}
\pgftransformyshift{\fp_to_dim:N \l__penrose_tmpa_fp}
}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {P} {
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {P} {
\group_begin:
- \int_gincr:N \l__penrose_tile_int
+ \int_gincr:N \g__penrose_tile_int
\fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/2}
\pgftransformxshift{-\fp_to_dim:N \l__penrose_tmpa_fp}
\fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim*tand(54)/2}
@@ -681,8 +897,8 @@
\pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
\tl_set:Nx \l__penrose_tmpc_tl
{
- {\int_use:N \l__penrose_tile_int}
- {\int_use:N \l__penrose_tiles_int}
+ {\int_use:N \g__penrose_tile_int}
+ {\int_use:N \g__penrose_tiles_int}
}
\UsePenroseTile[
every~ Penrose~ tile/.try,
@@ -692,14 +908,14 @@
{\l__penrose_pentagon_parity_int}
\space pentagon/.try,
every~ pentagon~ 5/.try,
- Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+ Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
]{pentagon~5}
\group_end:
}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {Q} {
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {Q} {
\group_begin:
- \int_gincr:N \l__penrose_tile_int
+ \int_gincr:N \g__penrose_tile_int
\fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/2}
\pgftransformxshift{-\fp_to_dim:N \l__penrose_tmpa_fp}
\fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim*tand(54)/2}
@@ -708,8 +924,8 @@
\pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
\tl_set:Nx \l__penrose_tmpc_tl
{
- {\int_use:N \l__penrose_tile_int}
- {\int_use:N \l__penrose_tiles_int}
+ {\int_use:N \g__penrose_tile_int}
+ {\int_use:N \g__penrose_tiles_int}
}
\UsePenroseTile[
every~ Penrose~ tile/.try,
@@ -719,14 +935,14 @@
{\l__penrose_pentagon_parity_int}
\space pentagon/.try,
every~ pentagon~ 3/.try,
- Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+ Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
]{pentagon~3}
\group_end:
}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {R} {
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {R} {
\group_begin:
- \int_gincr:N \l__penrose_tile_int
+ \int_gincr:N \g__penrose_tile_int
\fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim/2}
\pgftransformxshift{-\fp_to_dim:N \l__penrose_tmpa_fp}
\fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim*tand(54)/2}
@@ -735,8 +951,8 @@
\pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
\tl_set:Nx \l__penrose_tmpc_tl
{
- {\int_use:N \l__penrose_tile_int}
- {\int_use:N \l__penrose_tiles_int}
+ {\int_use:N \g__penrose_tile_int}
+ {\int_use:N \g__penrose_tiles_int}
}
\UsePenroseTile[
every~ Penrose~ tile/.try,
@@ -746,14 +962,14 @@
{\l__penrose_pentagon_parity_int}
\space pentagon/.try,
every~ pentagon~ 2/.try,
- Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+ Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
]{pentagon~2}
\group_end:
}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {G} {
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {G} {
\group_begin:
- \int_gincr:N \l__penrose_tile_int
+ \int_gincr:N \g__penrose_tile_int
\fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim*cosd(72)}
\pgftransformxshift{\fp_to_dim:N \l__penrose_tmpa_fp}
\fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim*tand(54)*cosd(72)}
@@ -762,20 +978,20 @@
\pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
\tl_set:Nx \l__penrose_tmpc_tl
{
- {\int_use:N \l__penrose_tile_int}
- {\int_use:N \l__penrose_tiles_int}
+ {\int_use:N \g__penrose_tile_int}
+ {\int_use:N \g__penrose_tiles_int}
}
\UsePenroseTile[
every~ Penrose~ tile/.try,
every~ pentagram/.try,
- Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+ Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
]{pentagram}
\group_end:
}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {B} {
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {B} {
\group_begin:
- \int_gincr:N \l__penrose_tile_int
+ \int_gincr:N \g__penrose_tile_int
\fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim*cosd(72)}
\pgftransformxshift{\fp_to_dim:N \l__penrose_tmpa_fp}
\fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim*tand(54)*cosd(72)}
@@ -784,20 +1000,20 @@
\pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
\tl_set:Nx \l__penrose_tmpc_tl
{
- {\int_use:N \l__penrose_tile_int}
- {\int_use:N \l__penrose_tiles_int}
+ {\int_use:N \g__penrose_tile_int}
+ {\int_use:N \g__penrose_tiles_int}
}
\UsePenroseTile[
every~ Penrose~ tile/.try,
every~ boat/.try,
- Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+ Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
]{boat}
\group_end:
}
-\prop_put:Nnn \g__penrose_pentagon_lms_action_prop {D} {
+\prop_gput:Nnn \g__penrose_pentagon_lms_action_prop {D} {
\group_begin:
- \int_gincr:N \l__penrose_tile_int
+ \int_gincr:N \g__penrose_tile_int
\pgftransformrotate{90}
\fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_step_dim*cosd(18)}
\pgftransformxshift{-\fp_to_dim:N \l__penrose_tmpa_fp}
@@ -805,18 +1021,18 @@
\pgftransformscale{\fp_use:N \l__penrose_tmpa_fp}
\tl_set:Nx \l__penrose_tmpc_tl
{
- {\int_use:N \l__penrose_tile_int}
- {\int_use:N \l__penrose_tiles_int}
+ {\int_use:N \g__penrose_tile_int}
+ {\int_use:N \g__penrose_tiles_int}
}
\UsePenroseTile[
every~ Penrose~ tile/.try,
every~ diamond/.try,
- Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try,
+ Penrose~ tile~ \int_use:N \g__penrose_tile_int/.try,
Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl
]{diamond}
\group_end:
}
-\cs_new_nopar:Npn \penrose_make_lms:Nnnn #1#2#3#4
+\cs_new_nopar:Npn \__penrose_make_lms:Nnnn #1#2#3#4
{
\group_begin:
\tl_set:Nn \l__penrose_tmpb_tl {#4}
@@ -842,8 +1058,8 @@
\tl_put_right:Nx \l__penrose_tmpa_tl {{\tl_use:N \l__penrose_tmpb_tl}}
\tl_use:N \l__penrose_tmpa_tl
}
-\cs_generate_variant:Nn \penrose_make_lms:Nnnn {Nnnx}
-\cs_new_nopar:Npn \penrose_invoke_lms:Nn #1#2
+\cs_generate_variant:Nn \__penrose_make_lms:Nnnn {Nnnx}
+\cs_new_nopar:Npn \__penrose_invoke_lms:Nn #1#2
{
\group_begin:
\tl_map_inline:Nn #1 {
@@ -860,39 +1076,39 @@
}
\group_end:
}
-\int_new:N \l__penrose_tile_int
-\int_new:N \l__penrose_tiles_int
+\int_new:N \g__penrose_tile_int
+\int_new:N \g__penrose_tiles_int
\NewDocumentCommand \PenroseDecomposition { O{} m m m }
{
\group_begin:
\tikzset{#1}
- \penrose_make_lms:Nnnx \l__penrose_tmpa_tl {#2} {#3} {#4}
- \penrose_count_lms:N \l__penrose_tmpa_tl
- \int_gzero:N \l__penrose_tile_int
- \int_gset:Nn \l__penrose_pentagon_parity_int {2}
- \penrose_invoke_lms:Nn \l__penrose_tmpa_tl {#2}
+ \__penrose_make_lms:Nnnx \l__penrose_tmpa_tl {#2} {#3} {#4}
+ \__penrose_count_lms:N \l__penrose_tmpa_tl
+ \int_gzero:N \g__penrose_tile_int
+ \int_set:Nn \l__penrose_pentagon_parity_int {2}
+ \__penrose_invoke_lms:Nn \l__penrose_tmpa_tl {#2}
\group_end:
}
-\cs_new_nopar:Npn \penrose_count_lms:N #1
+\cs_new_nopar:Npn \__penrose_count_lms:N #1
{
- \int_gzero:N \l__penrose_tiles_int
+ \int_gzero:N \g__penrose_tiles_int
\tl_map_inline:Nn #1
{
\tl_if_eq:nnT {##1} {T}
{
- \int_incr:N \l__penrose_tiles_int
+ \int_gincr:N \g__penrose_tiles_int
}
\tl_if_eq:nnT {##1} {t}
{
- \int_incr:N \l__penrose_tiles_int
+ \int_gincr:N \g__penrose_tiles_int
}
\tl_if_eq:nnT {##1} {G}
{
- \int_incr:N \l__penrose_tiles_int
+ \int_gincr:N \g__penrose_tiles_int
}
\tl_if_eq:nnT {##1} {g}
{
- \int_incr:N \l__penrose_tiles_int
+ \int_gincr:N \g__penrose_tiles_int
}
}
}
@@ -1986,7 +2202,7 @@
},
}
%%
-%% Copyright (C) 2014-2018 by Andrew Stacey <loopspace@mathforge.org>
+%% Copyright (C) 2014-2019 by Andrew Stacey <loopspace@mathforge.org>
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License (LPPL), either
@@ -1998,13 +2214,13 @@
%% This work is "maintained" (as per LPPL maintenance status) by
%% Andrew Stacey.
%%
-%% This work consists of the files penrose3.dtx
+%% This work consists of the files penrose_code.dtx
%% penrose.tex
%% and the derived files penrose.ins
-%% penrose3.pdf
+%% penrose_code.pdf
%% penrose.pdf
%% tikzlibrarypenrose.code.tex
-%% README
+%% README.txt
%%
%%
%% End of file `tikzlibrarypenrose.code.tex'.