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