Revision aa576811-a758-4d95-acb4-2127d14eee4d - Code Golf Stack Exchange
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 91 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
•Eó£ƵZ₃|ã
xWм7qèý`ÚA¿нÏ9,ÖcPÇŸ›ÎŸt¤,,ûUŨù—¤ï`ÿ¾ζ@η@••7¼P•в•pÏ{ʒÂfƨ¿ZF•15вú•DŠ\•4в£»31DT/:
[Try it online.](https://tio.run/##AaQAW/9vc2FiaWX//@KAokXDs8KjxrVa4oKDfMOjCnhX0Lw3ccOow71gw5pBwr/QvcOPOSzDlmNQw4fFuOKAusOOxbh0wqQsLMO7VcOFwqjDueKAlMKkw69gw7/Cvs62QM63QOKAouKAojfCvFDigKLQsuKAonDDj3vKksOCZsSGwqjCv1pG4oCiMTXQssO64oCiRMWgXOKAojTQssKjwrszMURULzr//w)
**Explanation:**
<!-- language-all: lang-python -->
•Eó£ƵZ₃|ã
xWм7qèý`ÚA¿нÏ9,ÖcPÇŸ›ÎŸt¤,,ûUŨù—¤ï`ÿ¾ζ@η@•
# Push compressed integer 31746388586852694571167828992290814184914816000404856451284780420784056983357043462437313025051647834765116670748406087616
•7¼P• # Push compressed integer 502885
в # Convert the larger integer to base-502885 as list:
# [59,0,64,230781,314159,26,502884,535,83279,1971,89,433,6939,79,44,937,323,749,510,84,58209,626]
•pÏ{ʒÂfƨ¿ZF• # Push compressed integer 60230047425392376760356855
15в # Convert it to base-15 as list:
# [12,1,1,14,0,6,5,5,0,4,3,0,13,7,3,8,7,3,4,4,11,0]
ú # Pad the integers in the first list with leading spaces,
# where the amount of spaces is that of the second list at the same indices:
# [" 59"," 0"," 64"," 230781","314159"," 26"," 502884"," 535","83279"," 1971"," 89","433"," 6939"," 79"," 44"," 937"," 323"," 749"," 510"," 84"," 58209","626"]
•DŠ\• # Push compressed integer 880633
4в # Convert it to base-4 as list: [3,1,1,2,3,3,3,3,2,1]
£ # Split the list of strings into parts of that size:
# [[" 59"," 0"," 64"],[" 230781"],["314159"],[" 26"," 502884"],[" 535","83279"," 1971"],[" 89","433"," 6939"],[" 79"," 44"," 937"],[" 323"," 749"," 510"],[" 84"," 58209"],["626"]]
» # Join each inner list by spaces, and then each string by newlines
31 # Push 31
D # Duplicate it
T/ # Divide the copy by 10: 3.1
: # Replace the "31" with "3.1" in the string
# (after which the result is output implicitly)
<!-- language-all: none -->
Note that all the leading spaces (except for the first integers in the line) are decreased by 1 because the `»` joins by spaces.
[See this 05AB1E tip of mine (section *How to compress large integers?* and *How to compress integer lists?*)](https://codegolf.stackexchange.com/a/166851/52210) to understand how the compressed parts works.
----------
Since I was curious, I also made a program using the actual PI-digits and drawing them in the specified pattern one by one using the Canvas builtin `Λ`. Which surprisingly enough is not that much larger (**97 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)**):
2žs•3]]\´ë:O•23в£J•ΘüÁи‘•11в0šúS•2q₄Beçq̧ßI/ÖÅ?¨L×Σ₃ÛuÌÎvêmtTYx¡n‡¢lΛf4ÙI₁¿çÑv•9в.Λ46Â:„ 4„3..;
[Try it online.](https://tio.run/##yy9OTMpM/f/f6Oi@4kcNi4xjY2MObTm82sofyDEyvrDp0GIvIOvcjMN7Djde2PGoYQaQZ2h4YZPB0YWHdwWDFBU@ampxSj28vPBwz@GmQ8sPz/fUPzztcKv9oRU@h6efW/yoqfnw7FKgXF/Z4VW5JSGRFYcW5j1qWHhoUc652Wkmh2d6PmpqPLT/8PLDE8uAxlle2KR3braJ2eEmq0cN8xRMgISxnp71//8A)
**Explanation:**
<!-- language-all: lang-python -->
2 # Push a 2
žs # Push an infinite list of PI digits: [3,1,4,1,5,...]
•3]]\´ë:O• # Push compressed integer 243177533433411924
23в # Convert it to base-23 as list: [11,2,5,2,3,22,3,3,5,3,2,10,1]
£ # Split the PI-digits into parts of that size
J # Join each inner list of digits together:
# [31415926535,89,79323,84,626,4338327950288419716939,937,510,58209,749,44,5923078164,0]
•ΘüÁи‘• # Push compressed integer 342434478685
11в # Convert it to base-11 as list: [1,2,2,2,5,3,3,7,7,1,10,2]
0š # Prepend a 0: [0,1,2,2,2,5,3,3,7,7,1,10,2]
ú # Pad the strings with that many leading spaces to the integers:
# ["31415926535"," 89"," 79323"," 84"," 626"," 4338327950288419716939"," 937"," 510"," 58209"," 749"," 44"," 5923078164"," 0"]
S # And convert it to a flattened list of characters
•2q₄Beçq̧ßI/ÖÅ?¨L×Σ₃ÛuÌÎvêmtTYx¡n‡¢lΛf4ÙI₁¿çÑv•
# Push compressed integer 1107440116348129217561550864085059321059233554362962027078200378907904337318203317830295973758995759889862300097
9в # Convert it to base-9 as list:
# [2,2,2,2,2,4,2,4,6,6,6,5,2,2,3,2,2,3,6,6,6,6,5,2,5,6,6,6,6,1,1,1,2,1,2,2,2,1,2,2,2,2,1,2,2,2,2,2,4,2,2,2,3,2,2,2,5,6,6,2,2,2,5,6,6,6,2,2,5,6,6,6,6,6,2,6,2,2,2,2,7,6,6,6,6,6,6,6,2,2,7,6,6,8,1,1,2,2,2,2,2,2,2,2,2,2,3,2,2,2,2,2,1,6,6,6,6]
.Λ # Use the Canvas builtin with these three lists, where
# - the 2 is the length of each line
# - the list ["3","1","4",...," "," ","0"] are the characters to draw
# - the list [2,2,2,...,6,6,6] are the directions
46 # Push 46
 # Bifurcate it (short for Duplicate & Reverse copy): 64
: # Replace the 46 with 64 in the string
„ 4„3..; # Replace the first " 4" with "3."
# (after which the result is output implicitly)
[See this 05AB1E tip of mine (section *How to compress large integers?* and *How to compress integer lists?*)](https://codegolf.stackexchange.com/a/166851/52210) to understand how the compressed parts works.
So we use the following options for the Canvas builtin:
- \$a\$ length: `2` (all lines are of size 2; or basically 1 since they're overlapping previous lines)
- \$b\$ the characters we want to display, which are the digits of PI with the spaces we added to travel around
- \$c\$ the directions, where `8` is a reset to the origin where we started, and the other directions are:
<!-- -->
7 0 1
↖ ↑ ↗
6 ← X → 2
↙ ↓ ↘
5 4 3
Here some of the first steps:
char: 3; direction: 2→
3
char: 1; direction: 2→
31
char: 4; direction: 2→
314
char: 1; direction: 2→
3141
char: 5; direction: 2→
31415
char: 9; direction: 2→
314159
char: 2; direction: 4↓
314159
2
char: 6; direction: 2→
314159
26
char: 5; direction: 4↓
314159
26
5
char: 3; direction: 6←
314159
26
35
char: 5; direction: 6←
314159
26
535
char: space; direction: 6←
314159
26
535
char: 8; direction: 5↙
314159
26
535
8
char: 9; direction: 2→
314159
26
535
89
etc.
Also note how I take advantage of the palindromized part `535` here so I'm able to draw those digits backwards. With most other digit-substrings I have to first go to the correct position with spaces before drawing the actual digits in direction `2→`.
I use this same palindroized approach also for the digit-substrings `323` and `626`.
The reason the first `3` of the PI-digits is replaced with a `4` is because we use a length of 2 (since lines are overlapping), which causes a minor issue in this case when we reset to the origin location with 'direction' `8`. Since we had to insert the dot anyway this doesn't really matter too much.
The `46` to `64` is because we couldn't move around to the next section with spaces like we did with all the other digits for the final `0`, since it's encapsulated inside other digits and we can't reach it.
[See this 05AB1E tip of mine](https://codegolf.stackexchange.com/a/175520/52210) for an in-depth explanation of how the Canvas builtin works.