-
Notifications
You must be signed in to change notification settings - Fork 1
2. Code examples: data mapping
Yuji Sode edited this page Jun 9, 2018
·
4 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
#Ishii1975_mites.tcl
#Ishii1975_mites.tcl
#----------------------------------------------
# data cited:
# Ishii, S., 1975. Seibutu Toukeigaku Nyuumon
# Tokyo, Japan, BAIFUKAN CO., LTD. (in Japanese)
#
# ISBN: 9784563037345
# NCID: BN04347526
#
#Table 9 in p.102
#species of mites in 10x15 grid
#----------------------------------------------
#Nsp is a list showing species number of mites in a cell
set Nsp [list\
4 6 5 15 14 10 10 10 7 7\
8 6 2 2 7 6 5 7 5 8\
4 8 5 2 4 7 7 2 4 8\
9 6 8 4 6 3 6 2 7 11\
4 2 4 4 5 3 8 8 3 8\
5 5 4 3 5 4 6 4 5 8\
7 8 3 3 3 4 5 2 7 3\
6 4 8 5 2 9 6 6 2 2\
6 3 5 6 7 6 8 3 7 8\
7 5 4 9 6 4 3 2 4 7\
5 6 5 2 4 3 4 5 5 9\
9 2 8 6 8 7 7 6 6 9\
11 6 12 7 4 5 8 7 4 6\
9 11 8 10 7 8 10 7 6 7\
8 8 7 9 11 8 13 7 10 1\
];
#----------------------------------------------
source ./txtMap.tcl;
set nHex [::txtMap::to4bitHex $Nsp 0 15];
::txtMap::outputMap $nHex 10 mites10x15.txt;
#scale
#0123456789abcdef
#⬚□◫▤▥▦▧▨▩▣■◩◆◇◈◬
Result
▥▧▦◬◈■■■▨▨
▩▧◫◫▨▧▦▨▦▩
▥▩▦◫▥▨▨◫▥▩
▣▧▩▥▧▤▧◫▨◩
▥◫▥▥▦▤▩▩▤▩
▦▦▥▤▦▥▧▥▦▩
▨▩▤▤▤▥▦◫▨▤
▧▥▩▦◫▣▧▧◫◫
▧▤▦▧▨▧▩▤▨▩
▨▦▥▣▧▥▤◫▥▨
▦▧▦◫▥▤▥▦▦▣
▣◫▩▧▩▨▨▧▧▣
◩▧◆▨▥▦▩▨▥▧
▣◩▩■▨▩■▨▧▨
▩▩▨▣◩▩◇▨■□
#imaginaryLandform_htmlOutput20180605.tcl
source ./txtMap.tcl;
#=== imaginaryLandform_20180601.tcl (Yuji SODE,2018): the MIT License; https://gist.github.com/YujiSODE/04348f5f81ae4276118179143ec56ffd ===
source ./imaginaryLandform_20180601.tcl;
set vHex [::txtMap::to4bitHex $V 5 155];
set comment {<a href="https://github.com/YujiSODE/txtMap">GitHub</a>};
append comment "\n";
append comment {Using map data of <a href="https://gist.github.com/YujiSODE/04348f5f81ae4276118179143ec56ffd">imaginaryLandform_20180601.tcl</a> (Yuji SODE,2018): the MIT License};
::txtMap::outputHTML $vHex 19 imaginaryLandform_19x26 $comment;
#scale
#0123456789abcdef
#⬚□◫▤▥▦▧▨▩▣■◩◆◇◈◬
Character map
▧▧▧▧▨▩▣▩▨▨▧▧▦▦▥▥▥▥▥
▧▧▨▩▣■■■■▣▩▨▧▦▦▦▥▥▥
▧▨▩▣■◩◆◩◩■▣▩▨▧▧▦▦▥▥
▧▩▣■◩◆◇◇◆◩■▣▩▧▧▦▦▥▥
▨▩■■◩◆◬◈◆◆◩■▩▨▧▧▦▥▥
▨▣■◩◆◇◬◬◈◆◩◩▩▨▧▧▦▥▥
▨▣■■◩◆◇◈◇◇◆◩▣▩▨▧▦▥▥
▨▩▣■◩◩◩◆◇◇◇◩■▩▨▧▦▥▥
▧▨▩▣■■◩◩◆◆◆◆■▩▨▧▦▥▥
▦▧▨▩▣▣▣▣◩◩◩◆◩▩▨▧▦▦▥
▥▦▧▧▨▨▩▩▣▣■◩■▩▨▧▦▦▥
◫▤▥▦▧▨▨▨▨▩▩▣▣▩▨▧▧▦▥
□◫◫▤▥▥▥▦▦▧▧▨▩▩▩▨▧▧▦
□□◫◫◫▤▤▤▤▤▥▥▨▩▣▩▨▧▦
□□□□□◫◫◫▤▤▤▤▨▩▣▣▩▨▦
□□□□□□□◫◫▤▤▦▨▩■◩▣▨▧
⬚□□□□□□◫▤▤▥▧▩▣■◩■▩▨
⬚⬚□□□□□◫▤▥▧▩▩▣◩◆■▣▨
⬚⬚⬚□□□◫▤▥▦▨▩▣◩◆◆■▣▨
⬚⬚⬚□□□◫▤▦▨▩▣■◩◇◆■▣▨
⬚⬚⬚□□◫◫▥▧▩▣■◩◆◆◩▣▩▨
⬚⬚⬚□□◫▤▦▨▩▣■◩◩◩■▩▨▧
⬚⬚□□◫◫▥▧▩▣■■■■▣▣▨▨▧
⬚⬚□◫◫◫▦▨▩▩▣▣▣▣▩▨▨▧▧
⬚□□◫◫▤▦▧▨▩▩▩▩▨▨▨▧▧▧
□□□◫◫▥▦▧▨▨▨▨▨▨▨▧▧▧▧