[math-fun] Wunderhilbertlich Curves
HilbertC = {"L" -> "+RF-LFL-FR+", "R" -> "-LF+RFR+FL-"}; WunderlichF5 = { "L" -> "+RFRF-LFLFL-F-LF+RFR+FL", "R" -> "-LFLF+RFRFR+F+RF-LFL-FR"}; AsymWunderhilbertlich = { "L" -> "+YF-XFX-FY+", "R" -> "-XF+YFY+FX-", "X" -> "+RFRF-LFLFL-F-LF+RFR+FL", "Y" -> "-LFLF+RFRFR+F+RF-LFL-FR"}; SymWunderhilbertlich ={ "L" -> "+YF-XFW-FZ+", "R" -> "-WF+ZFY+FX-", "X" -> "+RFRF-LFLFL-F-LF+RFR+FL", "Y" -> "-LFLF+RFRFR+F+RF-LFL-FR", "W" -> "LF+RFR+FL-F-LFLFL-FRFR+", "Z" -> "RF-LFL-FR+F+RFRFR+FLFL-"}; ToVec[str_] := FoldList[Switch[#2, "+", #1*{1, I}, "-", #1*{1, -I}, "F", {Total[#1], #1[[2]]}, _, #1] &, {0, 1}, Characters[str]] Grid[Partition[Map[Graphics[{Line[ReIm[ToVec[#][[All, 1]]]]} , ImageSize -> 250] &, NestList[StringReplace[#, AsymWunderhilbertlich] &, "L", 5]], 3], Frame -> All] Grid[Partition[Map[Graphics[{Line[ReIm[ToVec[#][[All, 1]]]]} , ImageSize -> 250] &, NestList[StringReplace[#, SymWunderhilbertlich] &, "L", 5]], 3], Frame -> All] Out[]: https://0x0.st/zt76.png https://0x0.st/zt7Y.png
Nice. In all three below only F is drawn (and a constant). Note to myself (code nobody can and should read, a math-fun tradition): stringsubst 3 L F F L +RFRF-LFLFL-F-LF+RFR+FL R -LFLF+RFRFR+F+RF-LFL-FR + + - - | tail -1 | tr -d 'LR' | ./bin 4 3 0 > tmp-pic.tex && make dotex # WunderlichF5 ## file wunderlich5.pdf (Figure 5) stringsubst 3 L F F L +YF-XFX-FY+ R -XF+YFY+FX- X +RFRF-LFLFL-F-LF+RFR+FL Y -LFLF+RFRFR+F+RF-LFL-FR + + - - | tail -1 | tr -d 'LRXY' | ./bin 4 3 0 > tmp-pic.tex && make dotex # AsymWunderhilbertlich ## file wunderlich5.pdf (Figure 4, right?) stringsubst 3 L F F L +YF-XFW-FZ+ R -WF+ZFY+FX- X +RFRF-LFLFL-F-LF+RFR+FL Y -LFLF+RFRFR+F+RF-LFL-FR W LF+RFR+FL-F-LFLFL-FRFR+ Z RF-LFL-FR+F+RFRFR+FLFL- + + - - | tail -1 | tr -d 'LRXYWZ' | ./bin 4 3 0 > tmp-pic.tex && make dotex # SymWunderhilbertlich ## file wunderlichx.pdf (Figure ???, can you help?) Find pdf renderings at https://jjj.de/tmp-wunderlich Best regards, jj * Brad Klee <bradklee@gmail.com> [Sep 28. 2019 17:51]:
HilbertC = {"L" -> "+RF-LFL-FR+", "R" -> "-LF+RFR+FL-"}; WunderlichF5 = { "L" -> "+RFRF-LFLFL-F-LF+RFR+FL", "R" -> "-LFLF+RFRFR+F+RF-LFL-FR"};
AsymWunderhilbertlich = { "L" -> "+YF-XFX-FY+", "R" -> "-XF+YFY+FX-", "X" -> "+RFRF-LFLFL-F-LF+RFR+FL", "Y" -> "-LFLF+RFRFR+F+RF-LFL-FR"};
SymWunderhilbertlich ={ "L" -> "+YF-XFW-FZ+", "R" -> "-WF+ZFY+FX-", "X" -> "+RFRF-LFLFL-F-LF+RFR+FL", "Y" -> "-LFLF+RFRFR+F+RF-LFL-FR", "W" -> "LF+RFR+FL-F-LFLFL-FRFR+", "Z" -> "RF-LFL-FR+F+RFRFR+FLFL-"};
ToVec[str_] := FoldList[Switch[#2, "+", #1*{1, I}, "-", #1*{1, -I}, "F", {Total[#1], #1[[2]]}, _, #1] &, {0, 1}, Characters[str]]
Grid[Partition[Map[Graphics[{Line[ReIm[ToVec[#][[All, 1]]]]} , ImageSize -> 250] &, NestList[StringReplace[#, AsymWunderhilbertlich] &, "L", 5]], 3], Frame -> All]
Grid[Partition[Map[Graphics[{Line[ReIm[ToVec[#][[All, 1]]]]} , ImageSize -> 250] &, NestList[StringReplace[#, SymWunderhilbertlich] &, "L", 5]], 3], Frame -> All]
Out[]:
https://0x0.st/zt76.png https://0x0.st/zt7Y.png
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
participants (2)
-
Brad Klee -
Joerg Arndt