%% %% This is file `tikzlibrarypenrose.code.tex', %% generated with the docstrip utility. %% %% The original source files were: %% %% penrose_code.dtx (with options: `library') %% ---------------------------------------------------------------- %% 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 %% ---------------------------------------------------------------- %% \RequirePackage{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} \fp_new:N \l__penrose_tmpa_fp \fp_new:N \l__penrose_tmpb_fp \fp_new:N \l__penrose_tmpc_fp \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 { \spath_get:nnN {#1} {initial point} \l__penrose_tmpa_tl \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 \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} \fp_set:Nn \l__penrose_tmpb_fp {\tl_head:N \l__penrose_tmpa_tl - \l__penrose_tmpb_fp} \fp_set:Nn \l__penrose_tmpc_fp {\l__penrose_tmpa_fp^2 + \l__penrose_tmpb_fp^2} \fp_set:Nn \l__penrose_tmpa_fp {\l__penrose_tmpa_fp/\l__penrose_tmpc_fp} \fp_set:Nn \l__penrose_tmpb_fp {\l__penrose_tmpb_fp/\l__penrose_tmpc_fp} \fp_set:Nn \l__penrose_tmpc_fp {-\l__penrose_tmpb_fp} \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_tmpa_fp} } \spath_get:nnN {#1} {initial point} \l__penrose_tmpa_tl \fp_set:Nn \l__penrose_tmpa_fp { (-1) * \l__penrose_tmpa_fp * \tl_head:N \l__penrose_tmpa_tl + (-1) * \l__penrose_tmpb_fp * \tl_tail:N \l__penrose_tmpa_tl } \fp_set:Nn \l__penrose_tmpb_fp { (-1) * \l__penrose_tmpa_fp * \tl_tail:N \l__penrose_tmpa_tl + \l__penrose_tmpb_fp * \tl_head:N \l__penrose_tmpa_tl } \tl_put_right:Nx \l__penrose_tmpb_tl { {\fp_to_dim:N \l__penrose_tmpa_fp} {\fp_to_dim:N \l__penrose_tmpb_fp} } \spath_transform:nV {#1} \l__penrose_tmpb_tl } \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} } \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 { \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} \tikz_scan_point:V \l__penrose_tmpb_tl \tl_put_right:Nx \l__penrose_tmpa_tl { {\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: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_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 \fp_set:Nn \l__penrose_tmpa_fp { \pgf@x } \fp_set:Nn \l__penrose_tmpb_fp { \pgf@y } \tl_set:Nx \l__penrose_tmpb_tl {\tl_head:N \l__penrose_tmpa_tl} \tikz_scan_point:V \l__penrose_tmpb_tl \fp_set:Nn \l__penrose_tmpa_fp {\pgf@x - \l__penrose_tmpa_fp} \fp_set:Nn \l__penrose_tmpb_fp {\pgf@y - \l__penrose_tmpb_fp} \fp_set:Nn \l__penrose_tmpc_fp {-\l__penrose_tmpb_fp} \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_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_close_path:n {Penrose path tile #1} } \cs_new_nopar:Npn \penrose_make_tile:nn #1#2 { \penrose_make_tile:nnn {#1} #2 } \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 { \fp_set:Nn \l__penrose_tmpa_fp{#2} \fp_set:Nn \l__penrose_tmpb_fp{#3} \tl_put_right:Nx #1 { {(\fp_use:N \l__penrose_tmpa_fp, \fp_use:N \l__penrose_tmpb_fp)} } } \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)} \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)} \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 {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 {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)} \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)} \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)} \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} \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)} \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 {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} \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}} \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 {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 {-1+3*cosd(108)+cosd(36)}{-sind(36)-sind(108)} \tl_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} \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}} \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 {-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}} \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)} \prop_gput:Nnx \g__penrose_tiles_prop {diamond} {{D B B D} {\tl_use:N \l__penrose_tmpa_tl}} \NewDocumentCommand \MakePenroseTile {m} { \prop_get:NnN \g__penrose_tiles_prop {#1} \l__penrose_tmpa_tl \penrose_make_tile:nV {#1} \l__penrose_tmpa_tl } \NewDocumentCommand \UsePenroseTile {O{} m} { \spath_clone:nn {Penrose path tile #2} {Penrose path tmpa} \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} } \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} } }, 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} \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_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_new:N \g__penrose_pentagon_lms_rule_prop \prop_put: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} {[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} {[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} { [s>G] [se[>d+R][e1B]] [+se[>d+R][e1B]] [-se[>d+R][e1B]] [*se[>d+R][e1B]] [_se[>d+R][e1B]] } % pentagram \prop_put: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} {[s>d+R][s>eG][se1B]} % diamond \prop_set_eq:NN \g__penrose_rtriangle_lms_rule_prop \g__penrose_rhombus_lms_rule_prop \prop_set_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 \prop_new:N \g__penrose_kite_lms_action_prop \prop_new:N \g__penrose_rtriangle_lms_action_prop \prop_new:N \g__penrose_ktriangle_lms_action_prop \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} {\pgftransformxshift{\l__penrose_step_dim}} \prop_put: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 {+} {\pgftransformrotate{144}} \prop_put:Nnn \g__penrose_rhombus_lms_action_prop {*} {\pgftransformrotate{108}} \prop_put:Nnn \g__penrose_rhombus_lms_action_prop {-} {\pgftransformrotate{216}} \prop_put:Nnn \g__penrose_rhombus_lms_action_prop {_} {\pgftransformrotate{252}} \prop_put:Nnn \g__penrose_rhombus_lms_action_prop {>} {\pgftransformrotate{180}} \prop_set_eq:NN \g__penrose_rtriangle_lms_action_prop \g__penrose_rhombus_lms_action_prop \prop_put:Nnn \g__penrose_rhombus_lms_action_prop {T} { \group_begin: \int_gincr:N \l__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} \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} } \UsePenroseTile[ every~ Penrose~ tile/.try, every~ thin~ rhombus/.try, Penrose~ tile~ \int_use:N \l__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} { \group_begin: \int_gincr:N \l__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} } \UsePenroseTile[ every~ Penrose~ tile/.try, every~ thick~ rhombus/.try, Penrose~ tile~ \int_use:N \l__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 {_} {\pgftransformrotate{-108}} \prop_put:Nnn \g__penrose_kite_lms_action_prop {>} {\pgftransformrotate{180}} \prop_set_eq:NN \g__penrose_ktriangle_lms_action_prop \g__penrose_kite_lms_action_prop \prop_put:Nnn \g__penrose_kite_lms_action_prop {T} { \group_begin: \int_gincr:N \l__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} } \UsePenroseTile[ every~ Penrose~ tile/.try, every~ kite/.try, Penrose~ tile~ \int_use:N \l__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} { \group_begin: \int_gincr:N \l__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} } \UsePenroseTile[ every~ Penrose~ tile/.try, every~ dart/.try, Penrose~ tile~ \int_use:N \l__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} { \group_begin: \int_gincr:N \l__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} } \UsePenroseTile[ every~ Penrose~ tile/.try, every~ reverse~ golden~ triangle/.try, Penrose~ tile~ \int_use:N \l__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} { \group_begin: \int_gincr:N \l__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} } \tl_set:Nx \l__penrose_tmpc_tl { {\int_use:N \l__penrose_tile_int} {\int_use:N \l__penrose_tiles_int} } \UsePenroseTile[ every~ Penrose~ tile/.try, every~ golden~ triangle/.try, Penrose~ tile~ \int_use:N \l__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} { \group_begin: \int_gincr:N \l__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} } \UsePenroseTile[ every~ Penrose~ tile/.try, every~ reverse~ golden~ gnomon/.try, Penrose~ tile~ \int_use:N \l__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} { \group_begin: \int_gincr:N \l__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} } \UsePenroseTile[ every~ Penrose~ tile/.try, every~ golden~ gnomon/.try, Penrose~ tile~ \int_use:N \l__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} { \group_begin: \int_gincr:N \l__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} } \UsePenroseTile[ every~ Penrose~ tile/.try, every~ reverse~ golden~ triangle/.try, Penrose~ tile~ \int_use:N \l__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} { \group_begin: \int_gincr:N \l__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} } \UsePenroseTile[ every~ Penrose~ tile/.try, every~ golden~ triangle/.try, Penrose~ tile~ \int_use:N \l__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} { \group_begin: \int_gincr:N \l__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} } \UsePenroseTile[ every~ Penrose~ tile/.try, every~ reverse~ golden~ gnomon/.try, Penrose~ tile~ \int_use:N \l__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} { \group_begin: \int_gincr:N \l__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} } \UsePenroseTile[ every~ Penrose~ tile/.try, every~ golden~ gnomon/.try, Penrose~ tile~ \int_use:N \l__penrose_tile_int/.try, Penrose~ tile/.try/.expand~ once=\l__penrose_tmpc_tl ]{golden~ gnomon} \group_end: } \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} { \int_set:Nn \l__penrose_pentagon_parity_int {3 - \l__penrose_pentagon_parity_int} } \prop_put:Nnn \g__penrose_pentagon_lms_action_prop {+} {\pgftransformrotate{72}} \prop_put:Nnn \g__penrose_pentagon_lms_action_prop {*} {\pgftransformrotate{144}} \prop_put:Nnn \g__penrose_pentagon_lms_action_prop {-} {\pgftransformrotate{288}} \prop_put:Nnn \g__penrose_pentagon_lms_action_prop {_} {\pgftransformrotate{216}} \prop_put:Nnn \g__penrose_pentagon_lms_action_prop {>} {\pgftransformrotate{180}} \prop_put:Nnn \g__penrose_pentagon_lms_action_prop {|} {\pgftransformxscale{-1}} \prop_put: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} { \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} { \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} { \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} { \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} { \group_begin: \int_gincr:N \l__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} \pgftransformyshift{-\fp_to_dim:N \l__penrose_tmpa_fp} \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} } \UsePenroseTile[ every~ Penrose~ tile/.try, every~ pentagon/.try, every~ \seq_item:Nn \l__penrose_pentagon_parity_seq {\l__penrose_pentagon_parity_int} \space pentagon/.try, every~ pentagon~ 5/.try, Penrose~ tile~ \int_use:N \l__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} { \group_begin: \int_gincr:N \l__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} \pgftransformyshift{-\fp_to_dim:N \l__penrose_tmpa_fp} \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} } \UsePenroseTile[ every~ Penrose~ tile/.try, every~ pentagon/.try, every~ \seq_item:Nn \l__penrose_pentagon_parity_seq {\l__penrose_pentagon_parity_int} \space pentagon/.try, every~ pentagon~ 3/.try, Penrose~ tile~ \int_use:N \l__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} { \group_begin: \int_gincr:N \l__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} \pgftransformyshift{-\fp_to_dim:N \l__penrose_tmpa_fp} \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} } \UsePenroseTile[ every~ Penrose~ tile/.try, every~ pentagon/.try, every~ \seq_item:Nn \l__penrose_pentagon_parity_seq {\l__penrose_pentagon_parity_int} \space pentagon/.try, every~ pentagon~ 2/.try, Penrose~ tile~ \int_use:N \l__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} { \group_begin: \int_gincr:N \l__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)} \pgftransformyshift{\fp_to_dim:N \l__penrose_tmpa_fp} \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} } \UsePenroseTile[ every~ Penrose~ tile/.try, every~ pentagram/.try, Penrose~ tile~ \int_use:N \l__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} { \group_begin: \int_gincr:N \l__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)} \pgftransformyshift{\fp_to_dim:N \l__penrose_tmpa_fp} \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} } \UsePenroseTile[ every~ Penrose~ tile/.try, every~ boat/.try, Penrose~ tile~ \int_use:N \l__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} { \group_begin: \int_gincr:N \l__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} \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} } \UsePenroseTile[ every~ Penrose~ tile/.try, every~ diamond/.try, Penrose~ tile~ \int_use:N \l__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 { \group_begin: \tl_set:Nn \l__penrose_tmpb_tl {#4} \prg_replicate:nn {#3} { \tl_set_eq:NN \l__penrose_tmpa_tl \l__penrose_tmpb_tl \tl_clear:N \l__penrose_tmpb_tl \tl_map_inline:Nn \l__penrose_tmpa_tl { \prop_if_in:cnTF {g__penrose_#2_lms_rule_prop} {##1} { \tl_put_right:Nx \l__penrose_tmpb_tl {\prop_item:cn {g__penrose_#2_lms_rule_prop} {##1} } } { \tl_put_right:Nn \l__penrose_tmpb_tl {##1} } } } \tl_set:Nn \l__penrose_tmpa_tl { \group_end: \tl_set:Nn #1 } \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 { \group_begin: \tl_map_inline:Nn #1 { \prop_if_in:cnTF {g__penrose_#2_lms_action_prop} {##1} { \prop_item:cn {g__penrose_#2_lms_action_prop} {##1} } { \prop_if_in:cnT {g__penrose_default_lms_action_prop} {##1} { \prop_item:cn {g__penrose_default_lms_action_prop} {##1} } } } \group_end: } \int_new:N \l__penrose_tile_int \int_new:N \l__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} \group_end: } \cs_new_nopar:Npn \penrose_count_lms:N #1 { \int_gzero:N \l__penrose_tiles_int \tl_map_inline:Nn #1 { \tl_if_eq:nnT {##1} {T} { \int_incr:N \l__penrose_tiles_int } \tl_if_eq:nnT {##1} {t} { \int_incr:N \l__penrose_tiles_int } \tl_if_eq:nnT {##1} {G} { \int_incr:N \l__penrose_tiles_int } \tl_if_eq:nnT {##1} {g} { \int_incr:N \l__penrose_tiles_int } } } \tikzset{ Penrose~ step/.code={ \dim_set:Nn \l__penrose_step_dim {#1} } } \ExplSyntaxOff \pgfmathsetmacro\pr@chphi{cos(18)} \pgfmathsetmacro\pr@shphi{sin(18)} \pgfmathsetmacro\pr@cphi{cos(36)} \pgfmathsetmacro\pr@sphi{sin(36)} \pgfmathsetmacro\pr@invphi{2/(sqrt(5)+1)} \pgfmathsetmacro\pr@phi{(sqrt(5)+1)/2} \pgfmathsetmacro\pr@invphisq{\pr@invphi*\pr@invphi} \pgfmathsetmacro\pr@ominvphisq{\pr@invphi - \pr@invphisq} \pgfmathsetmacro\pr@ominvphi{1 - \pr@invphi} \newif\if@edgealign \def\pr@getfirst#1#2\pr@stop{#1}% \def\test@edgealign#1{% \pgfkeysgetvalue{/tikz/Penrose/alignment edge}{\@penrose@tmpa}% \edef\@penrose@tmpb{#1}% \edef\@penrose@tmpa{\expandafter\pr@getfirst\@penrose@tmpa.\pr@stop}% \ifx\@penrose@tmpa\@penrose@tmpb \@edgealigntrue \else \@edgealignfalse \fi }% \newif\if@newedge \def\test@newedge#1{% \pgfkeysgetvalue{/tikz/Penrose/alignment new edge}{\@penrose@tmpa}% \edef\@penrose@tmpb{#1}% \edef\@penrose@tmpa{\@penrose@tmpa}% \ifx\@penrose@tmpa\@penrose@tmpb \@newedgetrue \else \@newedgefalse \fi }% \tikzset{ align with/.code args={#1 along #2}{% \pgfutil@in@{ using }{#2} \ifpgfutil@in@% \tikzset{ Penrose/alignment location=#1, Penrose/alignment set edges=#2, }% \else \tikzset{ Penrose/alignment location=#1, Penrose/alignment edge=#2, }% \fi }, Penrose/alignment set edges/.code args={#1 using #2}{% \tikzset{ Penrose/alignment edge=#1, Penrose/alignment new edge=#2 }, }, Penrose/alignment location/.initial={}, Penrose/alignment edge/.initial=a, Penrose/alignment new edge/.initial={}, every Penrose tile clip/.style={clip}, thin rhombus/.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}} \if\pgfkeysvalueof{/tikz/Penrose/alignment edge}b\relax \pgftransformrotate{-18}% \pgftransformshift{\pgfpoint{-\pr@chphi cm}{\pr@shphi cm}}% \else \if\pgfkeysvalueof{/tikz/Penrose/alignment edge}B\relax \pgftransformrotate{18}% \else \if\pgfkeysvalueof{/tikz/Penrose/alignment edge}a\relax \pgftransformrotate{198}% \pgftransformshift{\pgfpoint{-2*\pr@chphi cm}{0 cm}}% \else \if\pgfkeysvalueof{/tikz/Penrose/alignment edge}A\relax \pgftransformrotate{162}% \pgftransformshift{\pgfpoint{-\pr@chphi cm}{-\pr@shphi cm}}% \fi\fi\fi\fi \fi \UsePenroseTile[ every Penrose tile clip/.try, every thin rhombus clip/.try ]{thin rhombus} \UsePenroseTile[ every Penrose tile/.try, every thin rhombus/.try, pic actions ]{thin rhombus} \UsePenroseTile[ every Penrose arc clip/.try, every thin rhombus arc clip/.try ]{thin rhombus} \path[every circle arc/.try] (18:1) circle[radius=1/4]; \path[every long arc/.try] (-18:1) circle[radius=1/4]; \coordinate (-edge a start) at (0,0); \coordinate (-edge a end) at (18:1); \coordinate (-edge A start) at (18:1); \coordinate (-edge A end) at (2*\pr@chphi,0); \coordinate (-edge B start) at (2*\pr@chphi,0); \coordinate (-edge B end) at (-18:1); \coordinate (-edge b start) at (-18:1); \coordinate (-edge b end) at (0,0); \end{scope} }, thin rhombus/.style={ every Penrose pic/.try, pic type=thin rhombus, }, thick rhombus/.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}} \if\pgfkeysvalueof{/tikz/Penrose/alignment edge}b\relax \pgftransformrotate{144}% \pgftransformshift{\pgfpoint{-\pr@cphi cm}{-\pr@sphi cm}}% \else \if\pgfkeysvalueof{/tikz/Penrose/alignment edge}B\relax \pgftransformrotate{36}% \else \if\pgfkeysvalueof{/tikz/Penrose/alignment edge}a\relax \pgftransformrotate{-36}% \pgftransformshift{\pgfpoint{-\pr@cphi cm}{\pr@sphi cm}}% \else \if\pgfkeysvalueof{/tikz/Penrose/alignment edge}A\relax \pgftransformrotate{216}% \pgftransformshift{\pgfpoint{-2*\pr@cphi cm}{0 cm}}% \fi\fi\fi\fi \fi \UsePenroseTile[ every Penrose tile clip/.try, every thick rhombus clip/.try ]{thick rhombus} \UsePenroseTile[ every Penrose tile/.try, every thick rhombus/.try, pic actions ]{thick rhombus} \UsePenroseTile[ every Penrose arc clip/.try, every thick rhombus arc clip/.try ]{thick rhombus} \path[every circle arc/.try] (2*\pr@cphi,0) circle[radius=1/4]; \path[every long arc/.try] (0,0) circle[radius=3/4]; \coordinate (-edge B start) at (0,0); \coordinate (-edge B end) at (36:1); \coordinate (-edge a start) at (36:1); \coordinate (-edge a end) at (2*\pr@cphi,0); \coordinate (-edge A start) at (2*\pr@cphi,0); \coordinate (-edge A end) at (-36:1); \coordinate (-edge b start) at (-36:1); \coordinate (-edge b end) at (0,0); \end{scope} }, thick rhombus/.style={ every Penrose pic/.try, pic type=thick rhombus, }, kite/.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}}% \if\pgfkeysvalueof{/tikz/Penrose/alignment edge}c\relax \pgftransformrotate{-72}% \pgftransformshift{\pgfpoint{-\pr@cphi cm}{\pr@sphi cm}}% \else \if\pgfkeysvalueof{/tikz/Penrose/alignment edge}C\relax \pgftransformrotate{-108}% \pgftransformshift{\pgfpoint{-1 cm}{0 cm}}% \else \if\pgfkeysvalueof{/tikz/Penrose/alignment edge}a\relax \pgftransformrotate{36}% \else \if\pgfkeysvalueof{/tikz/Penrose/alignment edge}A\relax \pgftransformrotate{144}% \pgftransformshift{\pgfpoint{-\pr@cphi cm}{-\pr@sphi cm}}% \fi\fi\fi\fi \fi \UsePenroseTile[ every Penrose tile clip/.try, every kite clip/.try ]{kite} \UsePenroseTile[ every Penrose tile/.try, every kite/.try, pic actions ]{kite} \UsePenroseTile[ every Penrose arc clip/.try, every kite arc clip/.try ]{kite} \path[every circle arc/.try] (0,0) circle[radius=\pr@invphi]; \path[every long arc/.try] (1,0) circle[radius=\pr@invphisq]; \coordinate (-edge a start) at (0,0); \coordinate (-edge a end) at (36:1); \coordinate (-edge c start) at (36:1); \coordinate (-edge c end) at (1,0); \coordinate (-edge C start) at (1,0); \coordinate (-edge C end) at (-36:1); \coordinate (-edge A start) at (-36:1); \coordinate (-edge A end) at (0,0); \end{scope} }, dart/.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}}% \if\pgfkeysvalueof{/tikz/Penrose/alignment edge}c\relax \pgftransformrotate{108}% \else \if\pgfkeysvalueof{/tikz/Penrose/alignment edge}C\relax \pgftransformrotate{72}% \pgftransformshift% {\pgfpoint{\pr@invphi*\pr@shphi cm}{-\pr@invphi*\pr@chphi cm}}% \else \if\pgfkeysvalueof{/tikz/Penrose/alignment edge}a\relax \pgftransformrotate{-36}% \pgftransformshift% {\pgfpoint{\pr@invphi*\pr@shphi cm}{\pr@invphi*\pr@chphi cm}}% \else \if\pgfkeysvalueof{/tikz/Penrose/alignment edge}A\relax \pgftransformrotate{216}% \pgftransformshift{\pgfpoint{-\pr@invphi cm}{0 cm}}% \fi\fi\fi\fi \fi \UsePenroseTile[ every Penrose tile clip/.try, every dart clip/.try ]{dart} \UsePenroseTile[ every Penrose tile/.try, every dart/.try, pic actions ]{dart} \UsePenroseTile[ every Penrose arc clip/.try, every dart arc clip/.try ]{dart} \path[every circle arc/.try] (\pr@invphi,0) circle[radius=\pr@ominvphi]; \path[every long arc/.try] (0,0) circle[radius=\pr@ominvphisq]; \coordinate (-edge c start) at (0,0); \coordinate (-edge c end) at (108:\pr@invphi); \coordinate (-edge a start) at (108:\pr@invphi); \coordinate (-edge a end) at (\pr@invphi,0); \coordinate (-edge A start) at (\pr@invphi,0); \coordinate (-edge A end) at (-108:\pr@invphi); \coordinate (-edge C start) at (-108:\pr@invphi); \coordinate (-edge C end) at (0,0); \end{scope} }, kite/.style={ every Penrose pic/.try, pic type=kite, }, dart/.style={ every Penrose pic/.try, pic type=dart, }, golden triangle/.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}}% \if\pgfkeysvalueof{/tikz/Penrose/alignment edge}B\relax \pgftransformrotate{18}% \else \if\pgfkeysvalueof{/tikz/Penrose/alignment edge}C\relax \pgftransformrotate{-90}% \pgftransformshift{\pgfpoint{-\pr@chphi cm}{\pr@shphi cm}}% \else \if\pgfkeysvalueof{/tikz/Penrose/alignment edge}A\relax \pgftransformrotate{162}% \pgftransformshift{\pgfpoint{-\pr@chphi cm}{-\pr@shphi cm}}% \fi\fi\fi \fi \UsePenroseTile[ every Penrose tile clip/.try, every golden triangle clip/.try ]{golden triangle} \UsePenroseTile[ every Penrose tile/.try, every golden triangle/.try, pic actions ]{golden triangle} \coordinate (-edge a start) at (0,0); \coordinate (-edge a end) at (18:1); \coordinate (-edge c start) at (18:1); \coordinate (-edge c end) at (-18:1); \coordinate (-edge b start) at (-18:1); \coordinate (-edge b end) at (0,0); \end{scope} }, golden triangle/.style={ every Penrose pic/.try, pic type=golden triangle, }, reverse golden triangle/.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}}% \if\pgfkeysvalueof{/tikz/Penrose/alignment edge}b\relax \pgftransformrotate{162}% \pgftransformshift{\pgfpoint{-\pr@chphi cm}{-\pr@shphi cm}}% \else \if\pgfkeysvalueof{/tikz/Penrose/alignment edge}c\relax \pgftransformrotate{-90}% \pgftransformshift{\pgfpoint{-\pr@chphi cm}{\pr@shphi cm}}% \else \if\pgfkeysvalueof{/tikz/Penrose/alignment edge}a\relax \pgftransformrotate{18}% \fi\fi\fi \fi \UsePenroseTile[ every Penrose tile clip/.try, every reverse golden triangle clip/.try ]{reverse golden triangle} \UsePenroseTile[ every Penrose tile/.try, every reverse golden triangle/.try, pic actions ]{reverse golden triangle} \coordinate (-edge B start) at (0,0); \coordinate (-edge B end) at (18:1); \coordinate (-edge C start) at (18:1); \coordinate (-edge C end) at (-18:1); \coordinate (-edge A start) at (-18:1); \coordinate (-edge A end) at (0,0); \end{scope} }, reverse golden triangle/.style={ every Penrose pic/.try, pic type=reverse golden triangle, }, golden gnomon/.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}}% \if\pgfkeysvalueof{/tikz/Penrose/alignment edge}c\relax \pgftransformrotate{144}% \pgftransformshift{\pgfpoint{-\pr@cphi cm}{-\pr@sphi cm}}% \else \if\pgfkeysvalueof{/tikz/Penrose/alignment edge}B\relax \pgftransformrotate{-144}% \pgftransformshift{\pgfpoint{-2*\pr@cphi cm}{0 cm}}% \else \if\pgfkeysvalueof{/tikz/Penrose/alignment edge}a\relax \fi\fi\fi \fi \UsePenroseTile[ every Penrose tile clip/.try, every golden gnomon clip/.try ]{golden gnomon} \UsePenroseTile[ every Penrose tile/.try, every golden gnomon/.try, pic actions ]{golden gnomon} \coordinate (-edge C start) at (0,0); \coordinate (-edge C end) at (36:1); \coordinate (-edge b start) at (36:1); \coordinate (-edge b end) at (2*\pr@cphi,0); \coordinate (-edge A start) at (2*\pr@cphi,0); \coordinate (-edge A end) at (0,0); \end{scope} }, golden gnomon/.style={ every Penrose pic/.try, pic type=golden gnomon, }, reverse golden gnomon/.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}}% \if\pgfkeysvalueof{/tikz/Penrose/alignment edge}C\relax \pgftransformrotate{36}% \else \if\pgfkeysvalueof{/tikz/Penrose/alignment edge}b\relax \pgftransformrotate{-36}% \pgftransformshift{\pgfpoint{-\pr@cphi cm}{\pr@sphi cm}}% \else \if\pgfkeysvalueof{/tikz/Penrose/alignment edge}A\relax \pgftransformrotate{180}% \pgftransformshift{\pgfpoint{-2*\pr@cphi cm}{0 cm}}% \fi\fi\fi \fi \UsePenroseTile[ every Penrose tile clip/.try, every reverse golden gnomon clip/.try ]{reverse golden gnomon} \UsePenroseTile[ every Penrose tile/.try, every reverse golden gnomon/.try, pic actions ]{reverse golden gnomon} \coordinate (-edge a start) at (0,0); \coordinate (-edge a end) at (2*\pr@cphi,0); \coordinate (-edge B start) at (2*\pr@cphi,0); \coordinate (-edge B end) at (-36:1); \coordinate (-edge c start) at (-36:1); \coordinate (-edge c end) at (0,0); \end{scope} }, reverse golden gnomon/.style={ every Penrose pic/.try, pic type=reverse golden gnomon, }, pentagon 5/.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}}% \test@newedge{1}% \if@newedge \pgftransformrotate{180}% \pgftransformshift{\pgfpoint{-1 cm}{0 cm}}% \else \test@newedge{2}% \if@newedge \pgftransformshift{\pgfpoint{1 cm}{0 cm}}% \pgftransformrotate{108}% \pgftransformshift{\pgfpoint{-1 cm}{0 cm}}% \else \test@newedge{3}% \if@newedge \pgftransformshift% {\pgfpoint{\pr@phi * \pr@shphi cm}{- \pr@phi * \pr@chphi cm}}% \pgftransformrotate{36}% \else \test@newedge{4}% \if@newedge \pgftransformshift{\pgfpoint{- \pr@shphi cm}{-\pr@chphi cm}}% \pgftransformrotate{-36}% \else \test@newedge{5}% \if@newedge \pgftransformrotate{-108}% \fi\fi\fi\fi\fi \fi \UsePenroseTile[ every Penrose tile clip/.try, every pentagon clip/.try, every pentagon 5 clip/.try ]{pentagon 5} \UsePenroseTile[ every Penrose tile/.try, every pentagon/.try, every pentagon 5/.try, pic actions ]{pentagon 5} \coordinate (-edge a1 start) at (0,0); \coordinate (-edge a1 end) at (1,0); \coordinate (-edge a2 start) at (1,0); \coordinate (-edge a2 end) at (1+\pr@shphi,\pr@chphi); \coordinate (-edge a3 start) at (1+\pr@shphi,\pr@chphi); \coordinate (-edge a3 end) at (\pr@cphi-\pr@shphi,\pr@sphi+\pr@chphi); \coordinate (-edge a4 start) at (\pr@cphi-\pr@shphi,\pr@sphi+\pr@chphi); \coordinate (-edge a4 end) at (-\pr@shphi,\pr@chphi); \coordinate (-edge a5 start) at (-\pr@shphi,\pr@chphi); \coordinate (-edge a5 end) at (0,0); \end{scope} }, pentagon 5/.style={ every Penrose pic/.try, pic type=pentagon 5, }, pentagon 3/.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}}% \test@edgealign{a}% \if@edgealign \pgftransformrotate{180}% \pgftransformshift{\pgfpoint{-1 cm}{0 cm}}% \else \test@edgealign{B}% \if@edgealign% \test@newedge{1}% \if@newedge \pgftransformshift{\pgfpoint{1 cm}{0 cm}}% \pgftransformrotate{108}% \pgftransformshift{\pgfpoint{-1 cm}{0 cm}}% \else \pgftransformrotate{-108}% \fi \else \test@newedge{1}% \if@newedge \pgftransformshift% {\pgfpoint{\pr@phi * \pr@shphi cm}{- \pr@phi * \pr@chphi cm}}% \pgftransformrotate{36}% \else \pgftransformshift{\pgfpoint{- \pr@shphi cm}{-\pr@chphi cm}}% \pgftransformrotate{-36}% \fi\fi\fi \fi \UsePenroseTile[ every Penrose tile clip/.try, every pentagon clip/.try, every pentagon 3 clip/.try ]{pentagon 3} \UsePenroseTile[ every Penrose tile/.try, every pentagon/.try, every pentagon 3/.try, pic actions ]{pentagon 3} \coordinate (-edge A start) at (0,0); \coordinate (-edge A end) at (1,0); \coordinate (-edge b1 start) at (1,0); \coordinate (-edge b1 end) at (1+\pr@shphi,\pr@chphi); \coordinate (-edge a1 start) at (1+\pr@shphi,\pr@chphi); \coordinate (-edge a1 end) at (\pr@cphi-\pr@shphi,\pr@sphi+\pr@chphi); \coordinate (-edge a2 start) at (\pr@cphi-\pr@shphi,\pr@sphi+\pr@chphi); \coordinate (-edge a2 end) at (-\pr@shphi,\pr@chphi); \coordinate (-edge b2 start) at (-\pr@shphi,\pr@chphi); \coordinate (-edge b2 end) at (0,0); \end{scope} }, pentagon 3/.style={ every Penrose pic/.try, pic type=pentagon 3, }, pentagon 2/.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}}% \test@edgealign{D}% \if@edgealign \pgftransformrotate{180}% \pgftransformshift{\pgfpoint{-1 cm}{0 cm}}% \else \test@edgealign{a}% \if@edgealign% \test@newedge{1}% \if@newedge \pgftransformshift{\pgfpoint{1 cm}{0 cm}}% \pgftransformrotate{108}% \pgftransformshift{\pgfpoint{-1 cm}{0 cm}}% \else \pgftransformrotate{-108}% \fi \else \test@newedge{1}% \if@newedge \pgftransformshift% {\pgfpoint{\pr@phi * \pr@shphi cm}{- \pr@phi * \pr@chphi cm}}% \pgftransformrotate{36}% \else \pgftransformshift{\pgfpoint{- \pr@shphi cm}{-\pr@chphi cm}}% \pgftransformrotate{-36}% \fi\fi\fi \fi \UsePenroseTile[ every Penrose tile clip/.try, every pentagon clip/.try, every pentagon 2 clip/.try ]{pentagon 2} \UsePenroseTile[ every Penrose tile/.try, every pentagon/.try, every pentagon 2/.try, pic actions ]{pentagon 2} \coordinate (-edge d start) at (0,0); \coordinate (-edge d end) at (1,0); \coordinate (-edge A1 start) at (1,0); \coordinate (-edge A1 end) at (1+\pr@shphi,\pr@chphi); \coordinate (-edge c1 start) at (1+\pr@shphi,\pr@chphi); \coordinate (-edge c1 end) at (\pr@cphi-\pr@shphi,\pr@sphi+\pr@chphi); \coordinate (-edge c2 start) at (\pr@cphi-\pr@shphi,\pr@sphi+\pr@chphi); \coordinate (-edge c2 end) at (-\pr@shphi,\pr@chphi); \coordinate (-edge A2 start) at (-\pr@shphi,\pr@chphi); \coordinate (-edge A2 end) at (0,0); \end{scope} }, pentagon 2/.style={ every Penrose pic/.try, pic type=pentagon 2, }, pentagram/.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}}% \test@newedge{2}% \if@newedge \pgftransformshift{\pgfpoint{1 cm}{0 cm}}% \pgftransformrotate{72}% \else \test@newedge{3}% \if@newedge \pgftransformrotate{-72}% \pgftransformshift{\pgfpoint{2 * \pr@shphi cm}{0 cm}}% \else \test@newedge{4}% \if@newedge \pgftransformshift{\pgfpoint{1 cm + 2 * \pr@shphi cm}{0 cm}}% \else \test@newedge{5}% \if@newedge \pgftransformrotate{216}% \pgftransformshift{\pgfpoint{\pr@cphi cm}{\pr@sphi cm}}% \else \test@newedge{6}% \if@newedge \pgftransformshift{\pgfpoint{1cm}{0cm}}% \pgftransformrotate{-72}% \pgftransformshift{\pgfpoint{\pr@cphi cm}{\pr@sphi cm}}% \else \test@newedge{7}% \if@newedge \pgftransformrotate{144}% \pgftransformshift{\pgfpoint{\pr@shphi cm}{\pr@chphi cm}}% \else \test@newedge{8}% \if@newedge \pgftransformshift{\pgfpoint{1 cm + 2*\pr@shphi cm}{0cm}}% \pgftransformrotate{216}% \pgftransformshift{\pgfpoint{\pr@cphi cm}{\pr@sphi cm}}% \else \test@newedge{9}% \if@newedge \pgftransformshift{\pgfpoint{-2*\pr@shphi cm}{0cm}}% \pgftransformrotate{72}% \else \test@newedge{10}% \if@newedge \pgftransformrotate{144}% \pgftransformshift{\pgfpoint{-1 cm}{0 cm}}% \else \fi\fi\fi\fi\fi\fi\fi\fi\fi \fi \UsePenroseTile[ every Penrose tile clip/.try, every pentagram clip/.try ]{pentagram} \UsePenroseTile[ every Penrose tile/.try, every pentagram/.try, pic actions ]{pentagram} \coordinate (-edge C1 start) at (1,0); \coordinate (-edge C1 end) at (0,0); \coordinate (-edge C2 start) at (0,0); \coordinate (-edge C2 end) at (-\pr@shphi,\pr@chphi); \coordinate (-edge C3 start) at (-\pr@shphi,\pr@chphi); \coordinate (-edge C3 end) at (-2*\pr@shphi,0); \coordinate (-edge C4 start) at (-2*\pr@shphi,0); \coordinate (-edge C4 end) at (-1-2*\pr@shphi,0); \coordinate (-edge C5 start) at (-1-2*\pr@shphi,0); \coordinate (-edge C5 end) at (-\pr@cphi,-\pr@sphi); \coordinate (-edge C6 start) at (-\pr@cphi,-\pr@sphi); \coordinate (-edge C6 end) at (-\pr@cphi-\pr@shphi,-\pr@sphi-\pr@chphi); \coordinate (-edge C7 start) at (-\pr@cphi-\pr@shphi,-\pr@sphi-\pr@chphi); \coordinate (-edge C7 end) at (-\pr@shphi,-\pr@chphi); \coordinate (-edge C8 start) at (-\pr@shphi,-\pr@chphi); \coordinate (-edge C8 end) at (1-\pr@cphi+\pr@shphi,-\pr@sphi-\pr@chphi); \coordinate (-edge C9 start) at (1-\pr@cphi+\pr@shphi,-\pr@sphi-\pr@chphi); \coordinate (-edge C9 end) at (1-\pr@cphi,-\pr@sphi); \coordinate (-edge C10 start) at (1-\pr@cphi,-\pr@sphi); \coordinate (-edge C10 end) at (1,0); \end{scope} }, pentagram/.style={ every Penrose pic/.try, pic type=pentagram, }, boat/.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}}% \test@edgealign{d}% \if@edgealign \pgftransformrotate{180}% \pgftransformshift{\pgfpoint{\pr@cphi cm - 1cm}{\pr@sphi cm}}% \else \test@edgealign{b}% \if@edgealign% \test@newedge{2}% \if@newedge \pgftransformrotate{144}% \pgftransformshift{\pgfpoint{-1 cm}{0 cm}}% \else \pgftransformrotate{216}% \pgftransformshift{\pgfpoint{\pr@cphi cm}{\pr@sphi cm}}% \fi \else \test@edgealign{c}% \if@edgealign% \test@newedge{2}% \if@newedge \pgftransformshift{\pgfpoint{1 cm}{0 cm}}% \pgftransformrotate{72}% \else \test@newedge{3}% \if@newedge \pgftransformrotate{-72}% \pgftransformshift{\pgfpoint{2 * \pr@shphi cm}{0 cm}}% \else \test@newedge{4}% \if@newedge \pgftransformshift{\pgfpoint{1 cm + 2 * \pr@shphi cm}{0 cm}}% \else \fi\fi\fi\fi\fi\fi \fi \UsePenroseTile[ every Penrose tile clip/.try, every boat clip/.try ]{boat} \UsePenroseTile[ every Penrose tile/.try, every boat/.try, pic actions ]{boat} \coordinate (-edge C1 start) at (1,0); \coordinate (-edge C1 end) at (0,0); \coordinate (-edge C2 start) at (0,0); \coordinate (-edge C2 end) at (-\pr@shphi,\pr@chphi); \coordinate (-edge C3 start) at (-\pr@shphi,\pr@chphi); \coordinate (-edge C3 end) at (-2*\pr@shphi,0); \coordinate (-edge C4 start) at (-2*\pr@shphi,0); \coordinate (-edge C4 end) at (-1-2*\pr@shphi,0); \coordinate (-edge B1 start) at (-1-2*\pr@shphi,0); \coordinate (-edge B1 end) at (-\pr@cphi,-\pr@sphi); \coordinate (-edge D start) at (-\pr@cphi,-\pr@sphi); \coordinate (-edge D end) at (1-\pr@cphi,-\pr@sphi); \coordinate (-edge B2 start) at (1-\pr@cphi,-\pr@sphi); \coordinate (-edge B2 end) at (1,0); \end{scope} }, boat/.style={ every Penrose pic/.try, pic type=boat, }, diamond/.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}}% \test@edgealign{d}% \if@edgealign% \test@newedge{2}% \if@newedge \pgftransformshift{\pgfpoint{1cm}{0cm}}% \pgftransformrotate{-162}% \else \pgftransformrotate{-18}% \fi \else \test@newedge{2}% \if@newedge \pgftransformrotate{162}% \pgftransformshift{\pgfpoint{- 2 * \pr@chphi cm}{0cm}}% \else \pgftransformshift{\pgfpoint{- \pr@cphi cm}{-\pr@sphi cm}}% \pgftransformrotate{18}% \fi\fi \fi \UsePenroseTile[ every Penrose tile clip/.try, every diamond clip/.try ]{diamond} \UsePenroseTile[ every Penrose tile/.try, every diamond/.try, pic actions ]{diamond} \coordinate (-edge D1 start) at (0,0); \coordinate (-edge D1 end) at (\pr@chphi,\pr@shphi); \coordinate (-edge B1 start) at (\pr@chphi,\pr@shphi); \coordinate (-edge B1 end) at (2*\pr@chphi,0); \coordinate (-edge B2 start) at (2*\pr@chphi,0); \coordinate (-edge B2 end) at (\pr@chphi,-\pr@shphi); \coordinate (-edge D2 start) at (\pr@chphi,-\pr@shphi); \coordinate (-edge D2 end) at (0,0); \end{scope} }, diamond/.style={ every Penrose pic/.try, pic type=diamond, }, } %% %% Copyright (C) 2014-2018 by Andrew Stacey %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License (LPPL), either %% version 1.3c of this license or (at your option) any later %% version. The latest version of this license is in the file: %% %% http://www.latex-project.org/lppl.txt %% %% This work is "maintained" (as per LPPL maintenance status) by %% Andrew Stacey. %% %% This work consists of the files penrose3.dtx %% penrose.tex %% and the derived files penrose.ins %% penrose3.pdf %% penrose.pdf %% tikzlibrarypenrose.code.tex %% README %% %% %% End of file `tikzlibrarypenrose.code.tex'.