From 6957f7be1b0d24f0c46f0eeb3fa224493a74e7b5 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 20 Feb 2023 14:58:49 +0100 Subject: Various tools and piece generation scripts. --- tools/areas.pbm | Bin 0 -> 527863 bytes tools/areas.svg | 110 +++++ tools/areas.xcf | Bin 0 -> 10357677 bytes tools/boxes.svg | 785 +++++++++++++++++++++++++++++++++++ tools/cards.txt | 101 +++++ tools/cylinder_icon_auc.svg | 1 + tools/cylinder_icon_auc.svg.bak | 22 + tools/cylinder_icon_cartels.svg | 1 + tools/cylinder_icon_cartels.svg.bak | 19 + tools/cylinder_icon_farc.svg | 1 + tools/cylinder_icon_farc.svg.bak | 23 + tools/cylinder_icon_govt.svg | 1 + tools/genboxes.py | 73 ++++ tools/gendata.js | 390 +++++++++++++++++ tools/genpieces.mjs | 303 ++++++++++++++ tools/guerrilla_icon_auc.svg.bak | 22 + tools/guerrilla_icon_cartels.svg.bak | 19 + tools/guerrilla_icon_farc.svg.bak | 23 + tools/icon_auc.png | Bin 0 -> 9405 bytes tools/icon_cartels.png | Bin 0 -> 13850 bytes tools/icon_farc.png | Bin 0 -> 8835 bytes tools/icon_govt.png | Bin 0 -> 8566 bytes tools/isometric_icon_auc.pbm | Bin 0 -> 6923 bytes tools/isometric_icon_cartels.pbm | Bin 0 -> 6923 bytes tools/isometric_icon_farc.pbm | Bin 0 -> 6923 bytes tools/render_cards.sh | 16 + tools/render_cards_fixed.sh | 1 + tools/render_tokens.sh | 5 + tools/resize_cards.sh | 9 + tools/scale_tokens.sh | 52 +++ tools/slice_tokens.sh | 68 +++ 31 files changed, 2045 insertions(+) create mode 100644 tools/areas.pbm create mode 100644 tools/areas.svg create mode 100644 tools/areas.xcf create mode 100644 tools/boxes.svg create mode 100644 tools/cards.txt create mode 100644 tools/cylinder_icon_auc.svg create mode 100644 tools/cylinder_icon_auc.svg.bak create mode 100644 tools/cylinder_icon_cartels.svg create mode 100644 tools/cylinder_icon_cartels.svg.bak create mode 100644 tools/cylinder_icon_farc.svg create mode 100644 tools/cylinder_icon_farc.svg.bak create mode 100644 tools/cylinder_icon_govt.svg create mode 100644 tools/genboxes.py create mode 100644 tools/gendata.js create mode 100644 tools/genpieces.mjs create mode 100644 tools/guerrilla_icon_auc.svg.bak create mode 100644 tools/guerrilla_icon_cartels.svg.bak create mode 100644 tools/guerrilla_icon_farc.svg.bak create mode 100644 tools/icon_auc.png create mode 100644 tools/icon_cartels.png create mode 100644 tools/icon_farc.png create mode 100644 tools/icon_govt.png create mode 100644 tools/isometric_icon_auc.pbm create mode 100644 tools/isometric_icon_cartels.pbm create mode 100644 tools/isometric_icon_farc.pbm create mode 100644 tools/render_cards.sh create mode 100644 tools/render_cards_fixed.sh create mode 100644 tools/render_tokens.sh create mode 100644 tools/resize_cards.sh create mode 100644 tools/scale_tokens.sh create mode 100644 tools/slice_tokens.sh diff --git a/tools/areas.pbm b/tools/areas.pbm new file mode 100644 index 0000000..b1f7e00 Binary files /dev/null and b/tools/areas.pbm differ diff --git a/tools/areas.svg b/tools/areas.svg new file mode 100644 index 0000000..07b78f0 --- /dev/null +++ b/tools/areas.svg @@ -0,0 +1,110 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/areas.xcf b/tools/areas.xcf new file mode 100644 index 0000000..1833a5c Binary files /dev/null and b/tools/areas.xcf differ diff --git a/tools/boxes.svg b/tools/boxes.svg new file mode 100644 index 0000000..80c34e5 --- /dev/null +++ b/tools/boxes.svg @@ -0,0 +1,785 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/cards.txt b/tools/cards.txt new file mode 100644 index 0000000..67631f2 --- /dev/null +++ b/tools/cards.txt @@ -0,0 +1,101 @@ +GFAC +1. 1st Division +2. Ospina & Mora +3. Tapias +GFCA +4. Caño Limón - Coveñas +5. Occidental & Ecopetrol +6. Oil Spill +GAFC +7. 7th Special Forces +8. Fuerza Aérea Colombiana +9. High Mountain Battalions +GACF +10. Blackhawks +11. National Defense & Security Council +12. Plan Colombia +GCFA +13. Plan Meteoro +14. Tres Esquinas +15. War Tax +GCAF +16. Coffee Prices +17. Madrid Donors +18. NSPD-18 +FGAC +19. General Offensive +20. Mono Jojoy +21. Raúl Reyes +FGCA +22. Alfonso Cano +23. DoD Contractors +24. Operación Jaque +FAGC +25. Ejército de Liberación Nacional +26. Gramaje +27. Misil Antiaéreo +FACG +28. Hugo Chávez +29. Kill Zone +30. Peace Commission +FCGA +31. Betancourt +32. Secuestrados +33. Sucumbíos +FCAG +34. Airdropped AKs +35. Crop Substitution +36. Zona de Convivencia +AGFC +37. Former Military +38. National Coordination Center +39. Soldados campesinos +AGCF +40. Demobilization +41. Mancuso +42. Senado & Cámara +AFGC +43. Calima Front +44. Colombia Nueva +45. Los Derechos Humanos +AFCG +46. Limpieza +47. Pinto & del Rosario +48. Unión Sindical Obrera +ACGF +49. Bloques +50. Carabineros +51. Pipeline Repairs +ACFG +52. Castaño +53. Criminal Air Force +54. Deserters & Defectors +CGFA +55. DEA Agents +56. Drogas La Rebaja +57. Op Millennium +CGAF +58. General Serrano +59. Salcedo +60. The Chess Player +CFGA +61. Air Bridge +62. Amazonía +63. Narco-War +CFAG +64. Cocaine Labs +65. Poppies +66. Tingo María +CAGF +67. Mexican Traffickers +68. Narco-Subs +69. Riverines & Fast Boats +CAFG +70. Ayahuasca Tourism +71. Darién +72. Sicarios +---- +73. Propaganda! +74. Propaganda! +75. Propaganda! +76. Propaganda! diff --git a/tools/cylinder_icon_auc.svg b/tools/cylinder_icon_auc.svg new file mode 100644 index 0000000..6676cbd --- /dev/null +++ b/tools/cylinder_icon_auc.svg @@ -0,0 +1 @@ + diff --git a/tools/cylinder_icon_auc.svg.bak b/tools/cylinder_icon_auc.svg.bak new file mode 100644 index 0000000..d52d98f --- /dev/null +++ b/tools/cylinder_icon_auc.svg.bak @@ -0,0 +1,22 @@ + + + + +Created by potrace 1.16, written by Peter Selinger 2001-2019 + + + + + + + diff --git a/tools/cylinder_icon_cartels.svg b/tools/cylinder_icon_cartels.svg new file mode 100644 index 0000000..e5d5aa3 --- /dev/null +++ b/tools/cylinder_icon_cartels.svg @@ -0,0 +1 @@ + diff --git a/tools/cylinder_icon_cartels.svg.bak b/tools/cylinder_icon_cartels.svg.bak new file mode 100644 index 0000000..9b828e9 --- /dev/null +++ b/tools/cylinder_icon_cartels.svg.bak @@ -0,0 +1,19 @@ + + + + +Created by potrace 1.16, written by Peter Selinger 2001-2019 + + + + + + + diff --git a/tools/cylinder_icon_farc.svg b/tools/cylinder_icon_farc.svg new file mode 100644 index 0000000..d65b0c5 --- /dev/null +++ b/tools/cylinder_icon_farc.svg @@ -0,0 +1 @@ + diff --git a/tools/cylinder_icon_farc.svg.bak b/tools/cylinder_icon_farc.svg.bak new file mode 100644 index 0000000..68363c3 --- /dev/null +++ b/tools/cylinder_icon_farc.svg.bak @@ -0,0 +1,23 @@ + + + + +Created by potrace 1.16, written by Peter Selinger 2001-2019 + + + + + + + diff --git a/tools/cylinder_icon_govt.svg b/tools/cylinder_icon_govt.svg new file mode 100644 index 0000000..d091c13 --- /dev/null +++ b/tools/cylinder_icon_govt.svg @@ -0,0 +1 @@ + diff --git a/tools/genboxes.py b/tools/genboxes.py new file mode 100644 index 0000000..8686ef7 --- /dev/null +++ b/tools/genboxes.py @@ -0,0 +1,73 @@ +mode = None + +list = [] + +x = y = w = h = 0 +name = None + +def flush(): + global x, y, w, h, name + if mode == 'rect': + list.append((x,y,w,h,'box',name)) + if mode == 'circle': + x = cx - rx + y = cy - ry + w = rx * 2 + h = ry * 2 + list.append((x,y,w,h,'circle',name)) + x = y = w = h = 0 + name = None + +for line in open("tools/boxes.svg").readlines(): + line = line.strip() + if line == "') + # print('
') + # print('') + for (x,y,w,h,c,name) in list: + x = round(x) + y = round(y) + w = round(w) + h = round(h) + print(f'
{name}
') + # print('
') + +#print_html() +print_list2() diff --git a/tools/gendata.js b/tools/gendata.js new file mode 100644 index 0000000..58340af --- /dev/null +++ b/tools/gendata.js @@ -0,0 +1,390 @@ +let data = {} + +const IMAP = { G: "Government", F: "FARC", A: "AUC", C: "Cartels" } +let initiative = null +let cards = [ null ] +function def_initiative(s) { + initiative = [ IMAP[s[0]], IMAP[s[1]], IMAP[s[2]], IMAP[s[3]] ] +} +function def_card(number, name) { + cards[number] = { number, name, initiative } +} +def_initiative("GFAC") +def_card(1, "1st Division") +def_card(2, "Ospina & Mora") +def_card(3, "Tapias") +def_initiative("GFCA") +def_card(4, "Caño Limón - Coveñas") +def_card(5, "Occidental & Ecopetrol") +def_card(6, "Oil Spill") +def_initiative("GAFC") +def_card(7, "7th Special Forces") +def_card(8, "Fuerza Aérea Colombiana") +def_card(9, "High Mountain Battalions") +def_initiative("GACF") +def_card(10, "Blackhawks") +def_card(11, "National Defense & Security Council") +def_card(12, "Plan Colombia") +def_initiative("GCFA") +def_card(13, "Plan Meteoro") +def_card(14, "Tres Esquinas") +def_card(15, "War Tax") +def_initiative("GCAF") +def_card(16, "Coffee Prices") +def_card(17, "Madrid Donors") +def_card(18, "NSPD-18") +def_initiative("FGAC") +def_card(19, "General Offensive") +def_card(20, "Mono Jojoy") +def_card(21, "Raúl Reyes") +def_initiative("FGCA") +def_card(22, "Alfonso Cano") +def_card(23, "DoD Contractors") +def_card(24, "Operación Jaque") +def_initiative("FAGC") +def_card(25, "Ejército de Liberación Nacional") +def_card(26, "Gramaje") +def_card(27, "Misil Antiaéreo") +def_initiative("FACG") +def_card(28, "Hugo Chávez") +def_card(29, "Kill Zone") +def_card(30, "Peace Commission") +def_initiative("FCGA") +def_card(31, "Betancourt") +def_card(32, "Secuestrados") +def_card(33, "Sucumbíos") +def_initiative("FCAG") +def_card(34, "Airdropped AKs") +def_card(35, "Crop Substitution") +def_card(36, "Zona de Convivencia") +def_initiative("AGFC") +def_card(37, "Former Military") +def_card(38, "National Coordination Center") +def_card(39, "Soldados campesinos") +def_initiative("AGCF") +def_card(40, "Demobilization") +def_card(41, "Mancuso") +def_card(42, "Senado & Cámara") +def_initiative("AFGC") +def_card(43, "Calima Front") +def_card(44, "Colombia Nueva") +def_card(45, "Los Derechos Humanos") +def_initiative("AFCG") +def_card(46, "Limpieza") +def_card(47, "Pinto & del Rosario") +def_card(48, "Unión Sindical Obrera") +def_initiative("ACGF") +def_card(49, "Bloques") +def_card(50, "Carabineros") +def_card(51, "Pipeline Repairs") +def_initiative("ACFG") +def_card(52, "Castaño") +def_card(53, "Criminal Air Force") +def_card(54, "Deserters & Defectors") +def_initiative("CGFA") +def_card(55, "DEA Agents") +def_card(56, "Drogas La Rebaja") +def_card(57, "Op Millennium") +def_initiative("CGAF") +def_card(58, "General Serrano") +def_card(59, "Salcedo") +def_card(60, "The Chess Player") +def_initiative("CFGA") +def_card(61, "Air Bridge") +def_card(62, "Amazonía") +def_card(63, "Narco-War") +def_initiative("CFAG") +def_card(64, "Cocaine Labs") +def_card(65, "Poppies") +def_card(66, "Tingo María") +def_initiative("CAGF") +def_card(67, "Mexican Traffickers") +def_card(68, "Narco-Subs") +def_card(69, "Riverines & Fast Boats") +def_initiative("CAFG") +def_card(70, "Ayahuasca Tourism") +def_card(71, "Darién") +def_card(72, "Sicarios") +initiative = null +def_card(73, "Propaganda!") +def_card(74, "Propaganda!") +def_card(75, "Propaganda!") +def_card(76, "Propaganda!") + +console.log("const cards = {") +for (let c of cards) console.log(JSON.stringify(c) + ",") +console.log("}") + +let spaces = [ ] +let space_names = [ ] + +function add(list, item) { + if (!list.includes(item)) + list.push(item) +} + +function def_space(type, pop, name) { + spaces.push({ type, name, pop, adjacent: [] }) + space_names.push(name) +} + +function def_town(name) { + spaces.push({ type: "town", name, adjacent: [] }) + space_names.push(name) +} + +function def_loc(type, econ, cities, depts) { + let name = cities.join(" / ") + let loc_names = cities.concat(depts) + let loc_spaces = loc_names.map(n => space_names.indexOf(n)) + let ix = spaces.length + spaces.push({ type, name, econ, adjacent: loc_spaces.filter(x=>x>0) }) + for (let loc of loc_spaces) + if (loc >= 0) + add(spaces[loc].adjacent, ix) + space_names.push(name) + return ix +} + +function adjacent(an, bn) { + ax = space_names.indexOf(an) + bx = space_names.indexOf(bn) + add(spaces[ax].adjacent, bx) + add(spaces[bx].adjacent, ax) +} + +// Cities +data.first_pop = 1 +data.first_city = spaces.length + +def_space("city", 8, "Bogotá") +def_space("city", 3, "Cali") +def_space("city", 2, "Bucaramanga") +def_space("city", 2, "Ibagué") +def_space("city", 2, "Santa Marta") +def_space("city", 1, "Cartagena") +def_space("city", 1, "Cúcuta") +def_space("city", 1, "Medellín") +def_space("city", 1, "Neiva") +def_space("city", 1, "Pasto") +def_space("city", 1, "Sincelejo") + +data.last_city = spaces.length-1 + +data.first_dept = spaces.length + +// Departments +def_space("forest", 1, "Atlántico") +def_space("forest", 1, "Chocó") +def_space("forest", 1, "Nariño") +def_space("forest", 1, "Meta West") +def_space("forest", 1, "Guaviare") +def_space("forest", 1, "Putumayo") +def_space("mountain", 1, "Cesar") +def_space("mountain", 2, "Antioquia") +def_space("mountain", 2, "Santander") +def_space("mountain", 2, "Huila") +def_space("grassland", 1, "Arauca") +def_space("grassland", 1, "Meta East") + +data.last_pop = spaces.length-1 + +def_space("grassland", 0, "Vichada") +def_space("forest", 0, "Guainía") +def_space("forest", 0, "Vaupés") +def_space("forest", 0, "Amazonas") + +data.last_dept = spaces.length-1 + +data.first_foreign = spaces.length + +// Foreign Countries +def_space("foreign", 0, "Brasil") +def_space("foreign", 0, "Ecuador") +def_space("foreign", 0, "Panamá") +def_space("foreign", 0, "Perú") +def_space("foreign", 0, "Venezuela") + +data.last_foreign = spaces.length-1 + +// LoC + +data.first_loc = spaces.length + +def_loc("road", 1, [ "Santa Marta", "Cartagena"], [ "Atlántico" ]) +def_loc("road", 1, [ "Cali", "Pasto"], [ "Nariño", "Huila" ]) +def_loc("road", 1, [ "Neiva", "Pasto"], [ "Huila", "Putumayo" ]) +def_loc("road", 1, [ "Bogotá", "San José" ], [ "Meta East", "Meta West", "Guaviare" ]) + +def_loc("road", 1, [ "Pasto", "Tumaco" ], [ "Nariño", "Ecuador" ]) +def_loc("pipeline", 1, [ "Cali", "Buenaventura" ], [ "Chocó", "Nariño" ]) + +def_loc("pipeline", 1, [ "Cartagena", "Sincelejo"], [ "Atlántico" ]) +def_loc("pipeline", 2, [ "Sincelejo", "Medellín"], [ "Chocó", "Antioquia" ]) +def_loc("pipeline", 1, [ "Medellín", "Ibagué"], [ "Chocó", "Antioquia" ]) +def_loc("pipeline", 1, [ "Ibagué", "Cali"], [ "Chocó", "Huila" ]) + +def_loc("pipeline", 2, [ "Bucaramanga", "Ibagué", "Bogotá" ], [ "Antioquia", "Santa", "Huila" ]) +def_loc("pipeline", 2, [ "Bogotá", "Neiva" ], [ "Huila", "Meta West" ]) +def_loc("pipeline", 3, [ "Cúcuta", "Arauca" ], [ "Venezuela", "Arauca", "Santaner" ]) +def_loc("pipeline", 2, [ "Bogotá", "Yopal" ], [ "Santander", "Arauca", "Meta East"]) + +let ayacucho = [ + def_loc("pipeline", 2, [ "Santa Marta", "Ayacucho" ], [ "Cesar", "Santander", "Antioquia", "Atlántico" ]), + def_loc("pipeline", 2, [ "Bucaramanga", "Ayacucho" ], [ "Antioquia", "Atlántico", "Cesar", "Santander" ]), + def_loc("pipeline", 3, [ "Sincelejo", "Ayacucho" ], [ "Atlántico", "Cesar", "Santander", "Antioquia" ]), + def_loc("pipeline", 3, [ "Cúcuta", "Ayacucho" ], [ "Santander", "Antioquia", "Atlántico", "Cesar", "Venezuela" ]), +] + +for (let a of ayacucho) { + for (let b of ayacucho) + if (a !== b) + add(spaces[a].adjacent, b) +} + +data.last_loc = spaces.length-1 + +// City in Dept + +adjacent("Santa Marta", "Cesar") +adjacent("Santa Marta", "Atlántico") +adjacent("Cartagena", "Atlántico") +adjacent("Sincelejo", "Atlántico") +adjacent("Sincelejo", "Antioquia") +adjacent("Sincelejo", "Chocó") +adjacent("Medellín", "Chocó") +adjacent("Medellín", "Antioquia") +adjacent("Ibagué", "Chocó") +adjacent("Ibagué", "Antioquia") +adjacent("Ibagué", "Huila") +adjacent("Cali", "Chocó") +adjacent("Cali", "Huila") +adjacent("Cali", "Nariño") +adjacent("Pasto", "Nariño") +adjacent("Pasto", "Huila") +adjacent("Pasto", "Putumayo") +adjacent("Pasto", "Ecuador") +adjacent("Cúcuta", "Venezuela") +adjacent("Cúcuta", "Santander") +adjacent("Bucaramanga", "Antioquia") +adjacent("Bucaramanga", "Santander") +adjacent("Bogotá", "Santander") +adjacent("Bogotá", "Meta East") +adjacent("Bogotá", "Meta West") +adjacent("Bogotá", "Huila") +adjacent("Neiva", "Huila") +adjacent("Neiva", "Meta West") +adjacent("Neiva", "Putumayo") + +// Foreign - Dept + +adjacent("Panamá", "Chocó") + +adjacent("Venezuela", "Cesar") +adjacent("Venezuela", "Santander") +adjacent("Venezuela", "Arauca") +adjacent("Venezuela", "Vichada") +adjacent("Venezuela", "Guainía") + +adjacent("Brasil", "Guainía") +adjacent("Brasil", "Vaupés") +adjacent("Brasil", "Amazonas") + +adjacent("Ecuador", "Nariño") +adjacent("Ecuador", "Putumayo") + +adjacent("Perú", "Putumayo") +adjacent("Perú", "Amazonas") + +// Dept - Dept (with redundancies) + +adjacent("Atlántico", "Cesar") +adjacent("Atlántico", "Santander") +adjacent("Atlántico", "Antioquia") + +adjacent("Chocó", "Antioquia") +adjacent("Chocó", "Huila") +adjacent("Chocó", "Nariño") + +adjacent("Nariño", "Chocó") +adjacent("Nariño", "Huila") + +adjacent("Cesar", "Atlántico") +adjacent("Cesar", "Santander") +adjacent("Cesar", "Antioquia") + +adjacent("Antioquia", "Atlántico") +adjacent("Antioquia", "Cesar") +adjacent("Antioquia", "Santander") +adjacent("Antioquia", "Huila") +adjacent("Antioquia", "Chocó") + +adjacent("Santander", "Cesar") +adjacent("Santander", "Arauca") +adjacent("Santander", "Meta East") +adjacent("Santander", "Huila") +adjacent("Santander", "Antioquia") + +adjacent("Huila", "Antioquia") +adjacent("Huila", "Santander") +adjacent("Huila", "Meta West") +adjacent("Huila", "Putumayo") +adjacent("Huila", "Nariño") +adjacent("Huila", "Chocó") + +adjacent("Arauca", "Vichada") +adjacent("Arauca", "Meta East") +adjacent("Arauca", "Santander") + +adjacent("Vichada", "Arauca") +adjacent("Vichada", "Guainía") +adjacent("Vichada", "Guaviare") +adjacent("Vichada", "Meta East") + +adjacent("Meta East", "Arauca") +adjacent("Meta East", "Vichada") +adjacent("Meta East", "Guaviare") +adjacent("Meta East", "Meta West") +adjacent("Meta East", "Santander") + +adjacent("Meta West", "Meta East") +adjacent("Meta West", "Guaviare") +adjacent("Meta West", "Putumayo") +adjacent("Meta West", "Huila") + +adjacent("Putumayo", "Meta West") +adjacent("Putumayo", "Guaviare") +adjacent("Putumayo", "Vaupés") +adjacent("Putumayo", "Amazonas") +adjacent("Putumayo", "Huila") + +adjacent("Guaviare", "Meta East") +adjacent("Guaviare", "Vichada") +adjacent("Guaviare", "Guainía") +adjacent("Guaviare", "Vaupés") +adjacent("Guaviare", "Putumayo") +adjacent("Guaviare", "Meta West") + +adjacent("Guainía", "Vichada") +adjacent("Guainía", "Vaupés") +adjacent("Guainía", "Guaviare") + +adjacent("Vaupés", "Guainía") +adjacent("Vaupés", "Amazonas") +adjacent("Vaupés", "Putumayo") +adjacent("Vaupés", "Guaviare") + +adjacent("Amazonas", "Vaupés") +adjacent("Amazonas", "Putumayo") + +data.coastal_spaces = [ "Cesar", "Atlántico", "Chocó", "Nariño" ].map(n=>space_names.indexOf(n)).sort((a,b)=>a-b) + +for (let i = 1; i < spaces.length; ++i) + spaces[i].adjacent.sort((a,b)=>a-b) + +console.log("const spaces = [") +for (let x of spaces) console.log(JSON.stringify(x) + ",") +console.log("]") + +for (let k in data) + console.log("const", k, "=", JSON.stringify(data[k])) diff --git a/tools/genpieces.mjs b/tools/genpieces.mjs new file mode 100644 index 0000000..ec478f6 --- /dev/null +++ b/tools/genpieces.mjs @@ -0,0 +1,303 @@ +// Cylinder spaces on map are 48x48 + +// SIZES in millimeters +// cylinders = 14.5 x 10 +// discs = 14.5 x 4 +// cubes = 9 x 9 +// octagons = 10 x 10 + +// SIZES in 75dpi pixels +// cylinder = 43 x 29.5 +// disc = 43 x 12 +// cube = 26.6 x 26.6 +// octagon = 29.5 x 29.5 + +// SIZES in 72dpi pixels +// cylinder = 41 x 28 +// disc = 41 x 11 +// cube = 25 x 25 +// octagon = 28 x 28 + +// isometric scale = 2 / 3 +// vertical scale = 2 / 3 + +// octagon badge = 23x15 / 25x17 + +import fs from "fs" +import { formatHex, parseHex, convertRgbToOklab } from 'culori' + +function make_piece_colors(base) { + let rgb = parseHex(base) + let sh1 = convertRgbToOklab(rgb); sh1.l *= 0.9; + let sh2 = convertRgbToOklab(rgb); sh2.l *= 0.8; + let sh3 = convertRgbToOklab(rgb); sh3.l *= 0.7; + let sh4 = convertRgbToOklab(rgb); sh4.l *= 0.4; + return [ base, formatHex(sh1), formatHex(sh2), formatHex(sh3), formatHex(sh4) ] +} + +const color_govt = make_piece_colors("#0087cb") +const color_govt_police = make_piece_colors("#acdbf6") +const color_auc = make_piece_colors("#ffde00") +const color_farc = make_piece_colors("#db2128") +const color_cartels = make_piece_colors("#68b045") + +function print_cylinder(output, icon_file, c) { + let icon = fs.readFileSync(icon_file).toString('utf8') + let svg = [] + svg.push('') + + svg.push(``) + svg.push(``) + svg.push(``) + svg.push(``) + svg.push('') + + svg.push(``) + svg.push(``) + svg.push(icon) + + svg.push('') + fs.writeFileSync(output, svg.join("\n") + "\n") +} + +function print_disc(output, c) { + let svg = [] + svg.push('') + + svg.push(``) + svg.push(``) + svg.push(``) + svg.push(``) + svg.push('') + + svg.push(``) + svg.push(``) + + svg.push('') + fs.writeFileSync(output, svg.join("\n") + "\n") +} + +const star_auc = +"m11.414 4.602-1.03 2.062-3.315.008H3.755l.719.351c1.55.743 4.24 2.016 4.416 2.079.096.039.176.093.176.132 0 .04-.455.977-1.006 2.079-.551 1.109-.99 2.023-.975 2.039.008.015.424-.165.903-.391.487-.234 1.693-.805 2.691-1.281l1.805-.86.391.188c.208.101 1.03.492 1.821.86.79.374 1.805.85 2.26 1.07.447.218.847.374.87.343.033-.023-.383-.937-.926-2.023-.535-1.078-.966-1.992-.966-2.024 0-.03.24-.164.543-.304.471-.22 3.282-1.547 4.368-2.063l.4-.195H14.608l-1.03-2.07c-.559-1.141-1.046-2.07-1.078-2.07-.024 0-.511.929-1.086 2.07z" + +const star_farc = +"m11.254 4.71-1.19 1.556-.639.086c-.351.046-1.07.117-1.597.164a36.08 36.08 0 0 0-1.541.164c-.32.039-.75.07-.967.07-.207 0-.407.023-.43.055-.033.023.774.586 1.78 1.25 1.014.656 1.837 1.234 1.837 1.273 0 .047-.176.781-.4 1.64-.215.86-.399 1.595-.399 1.65 0 .1-.048.116 1.438-.4l2.076-.71c.503-.172.998-.336 1.086-.36.144-.03 1.342.313 1.83.524.087.039.43.156.758.265.327.11.966.32 1.421.477.456.156.839.274.855.258.016-.016-.16-.781-.4-1.703-.239-.922-.415-1.696-.399-1.727.024-.023.36-.258.767-.508 2.396-1.515 2.97-1.898 2.867-1.937a8.238 8.238 0 0 0-.759-.078c-.351-.032-.982-.086-1.397-.125-.416-.04-1.15-.102-1.622-.149-1.493-.14-1.253.024-2.595-1.734l-1.198-1.555-1.182 1.555z" + +const leaf = "M15.215 4.57c-.487.063-1.453.328-2.116.586-1.621.617-3.897 1.93-4.584 2.633-.56.57-.767 1.086-.767 1.89v.673l-.854.562c-.48.305-.863.586-.863.633 0 .07 1.374 1.015 1.478 1.015.024 0 .439-.257.934-.578l.887-.586.646.047c1.039.063 2.588-.218 3.546-.656.75-.336 2.085-1.305 3.115-2.25 1.853-1.695 2.124-3.18.703-3.797-.392-.164-1.502-.258-2.125-.172z" + +function print_octagon(output, badge_path, badge_fill, badge_stroke, c) { + let svg = [] + + // a + b + b = 30 + // a + 2 * a / sqrt(2) = 30 + // 1 + 2 / sqrt(2) = 30 / a + // 2.4142 = 30 / a + // 2.4142 * a = 30 + // a = 30 / 2.4142 + // = 12.4 + + let w = 24 + let a = w / (1 + 2 / Math.sqrt(2)) + let b = a / Math.sqrt(2) + let xo = 0 + let yo = 0 + let ys = 2/3 + let h = Math.round(w * 0.8) + + let v = [ + [ xo + (b + 0), (0) * ys + yo ], + [ xo + (b + a), (0) * ys + yo ], + [ xo + (b + a + b), (b) * ys + yo ], + [ xo + (b + a + b), (b + a) * ys + yo ], + [ xo + (b + a), (b + a + b) * ys + yo ], + [ xo + (b), (b + a + b) * ys + yo ], + [ xo + (0), (b + a) * ys + yo ], + [ xo + (0), (b) * ys + yo ], + ] + + for (let xy of v) { + xy[0] = Math.round(xy[0]) + 0.5 + xy[1] = Math.round(xy[1]) + 0.5 + } + + let v2 = [ + [ v[3][0], v[3][1] ], + [ v[3][0], v[3][1] + h ], + [ v[4][0], v[4][1] + h ], + [ v[5][0], v[5][1] + h ], + [ v[6][0], v[6][1] + h ], + [ v[6][0], v[6][1] ], + ] + + let v3 = [ + [ v[4][0], v[4][1] ], + [ v[4][0], v[4][1] + h ], + ] + + let v4 = [ + [ v[5][0], v[5][1] ], + [ v[5][0], v[5][1] + h ], + ] + + let f1 = [ + [ v[3][0], v[3][1] ], + [ v[3][0], v[3][1] + h ], + [ v[4][0], v[4][1] + h ], + [ v[4][0], v[4][1] ], + ] + + let f2 = [ + [ v[4][0], v[4][1] ], + [ v[4][0], v[4][1] + h ], + [ v[5][0], v[5][1] + h ], + [ v[5][0], v[5][1] ], + ] + + let f3 = [ + [ v[5][0], v[5][1] ], + [ v[5][0], v[5][1] + h ], + [ v[6][0], v[6][1] + h ], + [ v[6][0], v[6][1] ], + ] + + let p1 = v.map(([x,y])=>x + " " + y).join(" ") + let p2 = v2.map(([x,y])=>x + " " + y).join(" ") + let p3 = v3.map(([x,y])=>x + " " + y).join(" ") + let p4 = v4.map(([x,y])=>x + " " + y).join(" ") + + svg.push('') + + svg.push(``) + if (badge_path) + svg.push(``) + svg.push(``) + svg.push(``) + svg.push(``) + svg.push(``) + + svg.push('') + fs.writeFileSync(output, svg.join("\n") + "\n") +} + +function print_cube(output, c) { + let svg = [] + + let xo = 0 + let yo = 0 + let ys = 2/3 + + let w = 20 + let d = Math.sqrt(w * w + w * w) + let h = Math.round(w * 0.8) + + let v = [ + [ xo + (d/2), yo + (0) * ys ], + [ xo + (d), yo + (d/2) * ys ], + [ xo + (d/2), yo + (d) * ys ], + [ xo + (0), yo + (d/2) * ys ], + ] + + for (let xy of v) { + xy[0] = Math.round(xy[0]) + 0.5 + xy[1] = Math.round(xy[1]) + 0.5 + } + + let v2 = [ + [ v[1][0], v[1][1] ], + [ v[1][0], v[1][1] + h ], + [ v[2][0], v[2][1] + h ], + [ v[3][0], v[3][1] + h ], + [ v[3][0], v[3][1] ], + ] + + let v3 = [ + [ v[2][0], v[2][1] ], + [ v[2][0], v[2][1] + h ], + ] + + let f1 = [ + [ v[1][0], v[1][1] ], + [ v[1][0], v[1][1] + h ], + [ v[2][0], v[2][1] + h ], + [ v[2][0], v[2][1] ], + ] + + let f2 = [ + [ v[2][0], v[2][1] ], + [ v[2][0], v[2][1] + h ], + [ v[3][0], v[3][1] + h ], + [ v[3][0], v[3][1] ], + ] + + svg.push('') + + svg.push(``) + svg.push(``) + svg.push(``) + + svg.push(``) + + svg.push('') + fs.writeFileSync(output, svg.join("\n") + "\n") +} + +print_cylinder("images/govt_cylinder.svg", "tools/cylinder_icon_govt.svg", color_govt) +print_cylinder("images/farc_cylinder.svg", "tools/cylinder_icon_farc.svg", color_farc) +print_cylinder("images/auc_cylinder.svg", "tools/cylinder_icon_auc.svg", color_auc) +print_cylinder("images/cartels_cylinder.svg", "tools/cylinder_icon_cartels.svg", color_cartels) + +print_disc("images/govt_base.svg", color_govt) +print_disc("images/farc_base.svg", color_farc) +print_disc("images/auc_base.svg", color_auc) +print_disc("images/cartels_base.svg", color_cartels) + +print_octagon("images/farc_guerrilla_active.svg", star_farc, "#ffd800", "#8c1042", color_farc) +print_octagon("images/farc_guerrilla.svg", null, null, null, color_farc) +print_octagon("images/auc_guerrilla_active.svg", star_auc, "#0072bc", "#fff", color_auc) +print_octagon("images/auc_guerrilla.svg", null, null, null, color_auc) +print_octagon("images/cartels_guerrilla_active.svg", leaf, "#fff200", "#636466", color_cartels) +print_octagon("images/cartels_guerrilla.svg", null, null, null, color_cartels) + +print_cube("images/govt_troops.svg", color_govt) +print_cube("images/govt_police.svg", color_govt_police) + +let css = [ "/* TOKEN BORDER COLORS */" ] + +function border(base, sel) { + let rgb = parseHex(base) + // let hic = convertRgbToOklab(rgb); hic.l = Math.min(1,hic.l+0.1) + // let loc = convertRgbToOklab(rgb); loc.l = Math.max(0,loc.l-0.1) + // let shc = convertRgbToOklab(rgb); shc.l = Math.max(0,shc.l-0.4) + let hic = convertRgbToOklab(rgb); hic.l = Math.min(1,hic.l*1.2) + let loc = convertRgbToOklab(rgb); loc.l = Math.max(0,loc.l*0.8) + let shc = convertRgbToOklab(rgb); shc.l = Math.max(0,shc.l*0.4) + let sh = formatHex(shc) + let hi = formatHex(hic) + let lo = formatHex(loc) + css.push(`${sel} { background-color: ${base}; border-color: ${hi} ${lo} ${lo} ${hi}; box-shadow: 0 0 0 1px ${sh}, 0px 1px 4px #0008; }`) +} + +border("#006cb7", "#token_total_support") +border("#80643e", "#token_prop_card") +border("#d74729", "#token_oppose_plus_bases") +border("#004e81", "#token_el_presidente") +border("#6a8796", "#token_aid") +border("#4b87c0", ".token.passive_support") +border("#b75f61", ".token.passive_opposition") +border("#0054a6", ".token.active_support") +border("#991a1e", ".token.active_opposition") +border("#0054a6", ".token.govt_control") +border("#991a1e", ".token.farc_control") +border("#ffc509", ".token.farc_zone") +//border("#22010e", ".token.terror") +border("#535052", ".token.terror") +border("#535052", ".token.sabotage") +border("#9dadb3", ".token.unshaded") +border("#465c80", ".token.shaded") +border("#6d5735", ".token.reminder.sucumbios") +border("#cf1f30", ".token.reminder.senado_farc") +border("#6d9f3b", ".token.reminder.senado_cartels") +border("#ffcf00", ".token.reminder.senado_auc") +border("#8dc73f", ".token.reminder.darien") + +console.log(css.join("\n")) diff --git a/tools/guerrilla_icon_auc.svg.bak b/tools/guerrilla_icon_auc.svg.bak new file mode 100644 index 0000000..d7590c2 --- /dev/null +++ b/tools/guerrilla_icon_auc.svg.bak @@ -0,0 +1,22 @@ + + + + +Created by potrace 1.16, written by Peter Selinger 2001-2019 + + + + + + + diff --git a/tools/guerrilla_icon_cartels.svg.bak b/tools/guerrilla_icon_cartels.svg.bak new file mode 100644 index 0000000..9061687 --- /dev/null +++ b/tools/guerrilla_icon_cartels.svg.bak @@ -0,0 +1,19 @@ + + + + +Created by potrace 1.16, written by Peter Selinger 2001-2019 + + + + + + + diff --git a/tools/guerrilla_icon_farc.svg.bak b/tools/guerrilla_icon_farc.svg.bak new file mode 100644 index 0000000..ce0b1ff --- /dev/null +++ b/tools/guerrilla_icon_farc.svg.bak @@ -0,0 +1,23 @@ + + + + +Created by potrace 1.16, written by Peter Selinger 2001-2019 + + + + + + + diff --git a/tools/icon_auc.png b/tools/icon_auc.png new file mode 100644 index 0000000..c56ba06 Binary files /dev/null and b/tools/icon_auc.png differ diff --git a/tools/icon_cartels.png b/tools/icon_cartels.png new file mode 100644 index 0000000..3fdf6cc Binary files /dev/null and b/tools/icon_cartels.png differ diff --git a/tools/icon_farc.png b/tools/icon_farc.png new file mode 100644 index 0000000..170f635 Binary files /dev/null and b/tools/icon_farc.png differ diff --git a/tools/icon_govt.png b/tools/icon_govt.png new file mode 100644 index 0000000..cb04a3e Binary files /dev/null and b/tools/icon_govt.png differ diff --git a/tools/isometric_icon_auc.pbm b/tools/isometric_icon_auc.pbm new file mode 100644 index 0000000..7fb96ae Binary files /dev/null and b/tools/isometric_icon_auc.pbm differ diff --git a/tools/isometric_icon_cartels.pbm b/tools/isometric_icon_cartels.pbm new file mode 100644 index 0000000..71a0ca0 Binary files /dev/null and b/tools/isometric_icon_cartels.pbm differ diff --git a/tools/isometric_icon_farc.pbm b/tools/isometric_icon_farc.pbm new file mode 100644 index 0000000..7f89f31 Binary files /dev/null and b/tools/isometric_icon_farc.pbm differ diff --git a/tools/render_cards.sh b/tools/render_cards.sh new file mode 100644 index 0000000..e53998d --- /dev/null +++ b/tools/render_cards.sh @@ -0,0 +1,16 @@ +mkdir -p HIRES/cards +for I in 01 02 03 04 05 06 07 08 09 $(seq 10 76) 7x BACK +do + F1=$(echo "HIRES/AA CARD DECK PROOFS"/AAcard-$I".pdf") + F2=$(echo "HIRES/AA CARD DECK PROOFS"/AAcard-$I"_2018-nf.pdf") + if [ -e "$F1" ] + then + echo $F1 + gs -r1200 -sDEVICE=png16m -o HIRES/cards/card_$I.png "$F1" + fi + if [ -e "$F2" ] + then + echo $F2 + gs -r1200 -sDEVICE=png16m -o HIRES/cards/card_$I.png "$F2" + fi +done diff --git a/tools/render_cards_fixed.sh b/tools/render_cards_fixed.sh new file mode 100644 index 0000000..d182e55 --- /dev/null +++ b/tools/render_cards_fixed.sh @@ -0,0 +1 @@ +gs -r1200 -sDEVICE=png16m -o HIRES/cards/card_61.png "HIRES/AAcard-61-fixed.pdf" diff --git a/tools/render_tokens.sh b/tools/render_tokens.sh new file mode 100644 index 0000000..e4973d3 --- /dev/null +++ b/tools/render_tokens.sh @@ -0,0 +1,5 @@ +mkdir -p HIRES/tokens +# gs -r1200 -sDEVICE=png16m -o HIRES/tokens/sheet_a.png HIRES/AndeanAbyss_Tokens_FRONT-2018.pdf +# gs -r1200 -sDEVICE=png16m -o HIRES/tokens/sheet_b.png HIRES/AndeanAbyss_Tokens_BACK-2018.pdf +mutool draw -A0 -r1200 -z5 -o HIRES/tokens/sheet_a.png HIRES/AndeanAbyss_Tokens_FRONT-2018.pdf +mutool draw -A0 -r1200 -z5 -o HIRES/tokens/sheet_b.png HIRES/AndeanAbyss_Tokens_BACK-2018.pdf diff --git a/tools/resize_cards.sh b/tools/resize_cards.sh new file mode 100644 index 0000000..b868e4f --- /dev/null +++ b/tools/resize_cards.sh @@ -0,0 +1,9 @@ +mkdir -p cards.1x cards.2x +for F in HIRES/cards/*.png +do + echo $F + # 186x261 at 75dpi (unused) + # 248x348 at 100dpi + convert -colorspace RGB -gravity Center -crop 2976x4176+0+0 -resize 8.333333% -colorspace sRGB $F cards.1x/$(basename $F) + convert -colorspace RGB -gravity Center -crop 2976x4176+0+0 -resize 16.666666% -colorspace sRGB $F cards.2x/$(basename $F) +done diff --git a/tools/scale_tokens.sh b/tools/scale_tokens.sh new file mode 100644 index 0000000..83bffdf --- /dev/null +++ b/tools/scale_tokens.sh @@ -0,0 +1,52 @@ +mkdir -p tokens.1x tokens.2x + +function loop() { + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/five_a_1.ppm $OUT/govt_control.png + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/five_b_1.ppm $OUT/farc_control.png + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/five_a_6.ppm $OUT/farc_zone.png + + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/five_a_7.ppm $OUT/unshaded_ndsc.png + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/five_a_8.ppm $OUT/unshaded_ospina.png + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/five_a_15.ppm $OUT/unshaded_tapias.png + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/five_a_16.ppm $OUT/unshaded_1st_div.png + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/five_a_23.ppm $OUT/unshaded_black_hawks.png + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/five_a_24.ppm $OUT/unshaded_7th_sf.png + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/five_a_32.ppm $OUT/unshaded_meteoro.png + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/five_a_40.ppm $OUT/unshaded_mtn_bns.png + + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/five_b_7.ppm $OUT/shaded_ndsc.png + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/five_b_8.ppm $OUT/shaded_ospina.png + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/five_b_15.ppm $OUT/shaded_tapias.png + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/five_b_16.ppm $OUT/shaded_1st_div.png + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/five_b_23.ppm $OUT/shaded_black_hawks.png + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/five_b_24.ppm $OUT/shaded_7th_sf.png + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/five_b_32.ppm $OUT/shaded_meteoro.png + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/five_b_40.ppm $OUT/shaded_mtn_bns.png + + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/five_a_30.ppm $OUT/oppose_plus_bases.png + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/five_a_31.ppm $OUT/aid.png + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/five_a_37.ppm $OUT/el_presidente.png + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/five_a_38.ppm $OUT/total_support.png + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/five_a_39.ppm $OUT/prop_card.png + + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/half_a_1.ppm $OUT/active_support.png + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/half_a_2.ppm $OUT/terror.png + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/half_a_4.ppm $OUT/active_opposition.png + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/half_a_5.ppm $OUT/reminder_senado_cartels.png + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/half_a_6.ppm $OUT/reminder_darien.png + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/half_a_8.ppm $OUT/reminder_senado_auc.png + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/half_a_11.ppm $OUT/reminder_senado_farc.png + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/half_a_17.ppm $OUT/reminder_sucumbios.png + + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/half_b_1.ppm $OUT/passive_support.png + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/half_b_2.ppm $OUT/sabotage.png + convert -colorspace RGB -resize $SCALE -colorspace sRGB HIRES/tokens/half_b_4.ppm $OUT/passive_opposition.png +} + +OUT=tokens.1x +SCALE=6.25% +loop + +OUT=tokens.2x +SCALE=12.5% +loop diff --git a/tools/slice_tokens.sh b/tools/slice_tokens.sh new file mode 100644 index 0000000..5218792 --- /dev/null +++ b/tools/slice_tokens.sh @@ -0,0 +1,68 @@ +# die cut line width = 9 (+4 to center) +# 1/2" tokens 600px wide +# 5/8" tokens 750px wide + +# FRONT SHEET (left die cut edge) +# 1/2" at 588 1188 1788 1388 2988 +# 1/2" at 4188 4788 5388 5988 6588 +# 5/8" at 7896 8882 9868 10855 11841 + +# BACK SHEET (left die cut edge) +# 1/2" at 5991 6591 7191 7791 8391 9591 +# 5/8" at 588 1574 2560 3546 4533 + +# BOTH SHEETS (top die cut edge) +# 1/2" at 1356 5256 5856 +# 5/8" at 756 1742 2728 3714 4700 5688 6674 7660 + +# THEN trim some margins so the result @75dpi is 36 / 45 +# 1/2" 576x576+12+12 +# 5/8" 720x720+15+15 + +pngtopnm HIRES/tokens/sheet_a.png > /tmp/big.ppm + +I=1 +for L in 592 4192 4792 5392 5992 6592 +do + for T in 1360 5260 5860 + do + echo half $I $L $T + pnmcut $L $T 600 600 /tmp/big.ppm | pnmcut 12 12 576 576 | pnmtopng > HIRES/tokens/half_a_$I.ppm + I=$(expr $I + 1) + done +done + +I=1 +for L in 7900 8886 9872 10859 11845 +do + for T in 760 1746 2732 3718 4704 5692 6678 7664 + do + echo five $I $L $T + pnmcut $L $T 750 750 /tmp/big.ppm | pnmcut 15 15 720 720 | pnmtopng > HIRES/tokens/five_a_$I.ppm + I=$(expr $I + 1) + done +done + +pngtopnm HIRES/tokens/sheet_b.png > /tmp/big.ppm + +I=1 +for L in 9595 8395 7795 7195 6595 5995 +do + for T in 1360 5260 5860 + do + echo half $I $L $T + pnmcut $L $T 600 600 /tmp/big.ppm | pnmcut 12 12 576 576 | pnmtopng > HIRES/tokens/half_b_$I.ppm + I=$(expr $I + 1) + done +done + +I=1 +for L in 4537 3550 2564 1578 592 +do + for T in 760 1746 2732 3718 4704 5692 6678 7664 + do + echo five $I $L $T + pnmcut $L $T 750 750 /tmp/big.ppm | pnmcut 15 15 720 720 | pnmtopng > HIRES/tokens/five_b_$I.ppm + I=$(expr $I + 1) + done +done -- cgit v1.2.3