-
Notifications
You must be signed in to change notification settings - Fork 1
1. Code examples: Scale and Pi
Yuji Sode edited this page Jun 9, 2018
·
3 revisions
Tool for hexadecimal text data mapping.
GitHub: https://github.com/YujiSODE/txtMap
Wiki: https://github.com/YujiSODE/txtMap/wiki
Copyright (c) 2018 Yuji SODE <[email protected]>
This software is released under the MIT License.
See LICENSE or http://opensource.org/licenses/mit-license.php
source ./txtMap.tcl;
::txtMap::scale \#\[ \] \#\[ \];
Result
#[0123456789abcdef]
#[⬚□◫▤▥▦▧▨▩▣■◩◆◇◈◬]
#pi102_map.tcl
#102 digits of pi in unicode characters
#
#102 digits of pi
set pi_102 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798;
#Reference
#value of pi by Keisan Online Calculator service (CASIO COMPUTER CO., LTD.)
#Results were derived on Wed May 16 2018 13:11:45 GMT+0900 (JST) and from:
#https://keisan.casio.jp/calculator
source ./txtMap.tcl;
set pi [string map {. {}} $pi_102];
::txtMap::outputMap $pi 10 pi_102Map.txt;
Result
▤□▥□▦▣◫▧▦▤
▦▩▣▨▣▤◫▤▩▥
▧◫▧▥▤▤▩▤◫▨
▣▦⬚◫▩▩▥□▣▨
□▧▣▤▣▣▤▨▦□
⬚▦▩◫⬚▣▨▥▣▥
▥▦▣◫▤⬚▨▩□▧
▥⬚▧◫▩▧◫⬚▩▣
▣▩▧◫▩⬚▤▥▩◫
▦▤▥◫□□▨⬚▧▨
▣▩
#pi102_hexMap.tcl
#102 digits of pi in decimals
#
#102 digits of pi
set pi_102 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798;
#Reference
#value of pi by Keisan Online Calculator service (CASIO COMPUTER CO., LTD.)
#Results were derived on Wed May 16 2018 13:11:45 GMT+0900 (JST) and from:
#https://keisan.casio.jp/calculator
source ./txtMap.tcl;
set pi [string map {. {}} $pi_102];
::txtMap::outputHexMap [::txtMap::hexToMap $pi 10] pi_102HexMap.txt;
Result
3141592653
5897932384
6264338327
9502884197
1693993751
0582097494
4592307816
4062862089
9862803482
5342117067
98