//font = loadFont("Courier-60.vlw"); int fontSize = 14;//15 int countryCenter = 50; //width/20; int fillValue = 100; PFont font; PFont font2; int offset = 30; int spacer1; boolean greyTime = false; PImage bg; class Country { String name; int yCenter; String myNumber; int myFill; boolean redMe = false; boolean greyMe = false; Country(String name_, int yCenter_, String myNumber_) { myNumber = myNumber_; name = name_; yCenter = yCenter_; } void display() { if(redMe==false) { fill(fillValue); } else { fill(220,0,0); } //font = createFont("Courier", fontSize); textFont(font); text(this.name,countryCenter,yCenter); } void blowUp() { fill(220,0,0,200); //font = createFont("Courier", 40); textFont(font2); text(this.myNumber,countryCenter-35,yCenter-13); } } class Word { String name; int yCenter; int xCenter; int myFill; boolean redMe = false; String myNumber; Word(String name_, int yCenter_, int xCenter_, int myFill_, String myNumber_) { myNumber = myNumber_; name = name_; yCenter = yCenter_; xCenter = xCenter_; myFill = myFill_; } void display() { if(redMe==true) { fill(220,0,0); } else if(redMe==false && greyTime == true){ fill(205); } else { fill(myFill); } //font = createFont("Courier", fontSize); textFont(font); text(this.name,xCenter,yCenter); } void blowUp() { fill(220,0,0,200); //font = createFont("Courier", 40); textFont(font2); text(this.myNumber,xCenter-4,yCenter-13); } } String [] countries = { "China","30303", "France","25665","India","25332","Japan","18468","Italy","18245","Spain","15876","England","12618","Greece","10425", "Mexico","9449", "Germany","7658", "Ireland","7245" }; ///DESCRIPTIONS String [] desk1 = { "mandarin", "3190", "travel", "2853", "drama", "2647", "new", "2514", "literature", "2154", "year", "1992", "life", "1980", "childrens", "1722", "social", "1690", "music", "1624", "great", "1495", "cooking", "1484", "customs", "1464", "books", "1459", "journey", "1455", "graphic", "1454", "biography", "1442", "dialects", "1434", "novels", "1422", "adventure", "1387", "story", "1351", "world", "1327", "materials", "1286", "medicine", "1226", "american", "1218", "bilingual", "1175", "folklore", "1150", "cookery", "1127", "comic", "1121", "strips", "1119", "through", "1112" }; String [] desk2 = { "cooking", "3440", "life", "3023", "cookery", "2762", "music", "2401", "guidebooks", "1993", "child", "1759", "julia", "1754", "food", "1730", "songs", "1669", "travel", "1617", "women", "1556", "war", "1499", "art", "1374", "paris", "1336", "foreign", "1321", "drama", "1310", "tour", "1254", "social", "1222", "badgers", "1152", "volume", "1117", "study", "994", "customs", "990", "textbooks", "981", "century", "972", "teaching", "961", "world", "935", "books", "921", "revolution", "884", "recipes", "878", "mastering", "873" }; String [] desk3 = {"travel", "6567", "north", "4902", "america", "4750", "drama", "3820", "music", "3198", "character", "3109", "adventure", "3076", "fictitious", "3068", "biography", "2835", "cooking", "2613", "love", "2551", "kingdom", "2527", "skull", "2479", "crystal", "2478", "indic", "2359", "one", "2312", "everything", "2269", "elizabeth", "2266", "gilbert", "2266", "across", "2258", "eat", "2251", "pray", "2251", "northwest", "2082", "writers", "1847", "american", "1840", "cookery", "1700", "relations", "1590", "time", "1472", "life", "1352", "diary", "1330" }; String [] desk4 = {"cooking", "1602", "gardens", "1562", "art", "1533", "war", "1490", "world", "1459", "american", "1444", "cookery", "1251", "music", "1230", "literature", "1224", "life", "1215", "books", "1171", "patterns", "1127", "americans", "1124", "tokyo", "1116", "comic", "1050", "strips", "1008", "design", "972", "social", "912", "popular", "898", "technique", "830", "graphic", "823", "novels", "813", "travel", "796", "teenage", "774", "century", "764", "architecture", "743", "boys", "732", "yakitate", "728", "customs", "717", "childrens", "688" }; String [] desk5 = {"travel", "6940", "cooking", "4342", "cookery", "3561", "love", "2995", "one", "2564", "eat", "2357", "everything", "2320", "biography", "2270", "across", "2251", "elizabeth", "2251", "gilbert", "2251", "pray", "2251", "recipes", "2158", "guidebooks", "1982", "writers", "1840", "life", "1415", "tuscany", "1205", "home", "976", "style", "956", "easy", "953", "rick", "879", "books", "849", "steves", "839", "europe", "761", "music", "759", "free", "743", "slow", "740", "food", "719", "cities", "693", "social", "656" }; //SPAIN String [] desk6 = {"travel", "1973", "foreign", "1826", "teaching", "1594", "study", "1531", "textbooks", "1504", "materials", "1434", "bilingual", "1407", "vocabulary", "1342", "childrens", "1247", "guidebooks", "1193", "american", "1140", "dictionaries", "1136", "grammar", "1067", "books", "950", "picture", "850", "cookery", "821", "learn", "813", "latin", "799", "music", "798", "conversation", "761", "cooking", "756", "volume", "706", "songs", "677", "phrase", "662", "learning", "652", "war", "581", "ultimate", "544", "intermediate", "540", "rick", "532", "steves", "532"}; String [] desk7 = {"music", "3433", "columbia", "3014", "great", "2956", "britain", "2768", "guidebooks", "2762", "pacific", "2589", "northwest", "2450", "drama", "2236", "rock", "2152", "washington", "2077", "new", "2037", "oregon", "1796", "century", "1602", "social", "1531", "guide", "1230", "comedy", "1180", "coast", "1149", "life", "1005", "up", "980", "stand", "942", "travel", "894", "king", "889", "best", "821", "popular", "809", "biography", "744", "customs", "744", "plants", "729", "state", "696", "american", "645", "men", "587"}; String [] desk8 = {"mythology", "4745", "literature", "2875", "ancient", "2354", "civilization", "2100", "myths", "1586", "travel", "1520", "comedy", "1410", "get", "1268", "classical", "1055", "gods", "832", "guidebooks", "724", "music", "655", "life", "600", "drama", "599", "islands", "589", "modern", "588", "book", "570", "myth", "536", "cooking", "534", "world", "434", "stories", "433", "cookery", "375", "rock", "365", "art", "323", "cartoons", "305", "novels", "303", "mediterranean", "300", "graphic", "293", "heroes", "288", "social", "285"}; String [] desk9 = {"guidebooks", "2863", "new", "1720", "cooking", "1521", "life", "1213", "travel", "1146", "pacific", "1133", "social", "1050", "cookery", "972", "customs", "902", "city", "749", "american", "701", "guide", "653", "recipes", "637", "literature", "614", "america", "577", "coast", "577", "arizona", "480", "art", "476", "songs", "461", "drama", "438", "puerto", "395", "century", "391", "music", "371", "vallarta", "371", "folk", "359", "james", "347", "free", "339", "folklore", "337", "time", "331", "stories", "330"}; String [] desk10 = {"war", "1746", "mystery", "1201", "world", "1186", "drama", "1123", "travel", "1121", "relations", "839", "good", "835", "interpersonal", "783", "triangles", "783", "guidebooks", "673", "nazi", "543", "books", "456", "great", "439", "europe", "425", "phrase", "416", "conversation", "414", "britain", "410", "television", "405", "rick", "381", "steves", "381", "detective", "375", "foyles", "367", "scandinavia", "360", "social", "357", "century", "308", "literature", "289", "operations", "281", "campaigns", "280", "national", "280", "life", "278"}; String [] desk11 = {"travel", "1331", "folk", "1268", "music", "1180", "mystery", "1065", "songs", "797", "country", "704", "stories", "701", "guidebooks", "654", "britain", "567", "historical", "566", "scotland", "517", "pastoral", "514", "folklore", "491", "great", "465", "tales", "448", "europe", "435", "ancient", "426", "literature", "409", "rick", "408", "steves", "408", "story", "358", "northern", "352", "medieval", "342", "girl", "338", "women", "325", "drama", "307", "fairy", "302", "television", "301", "series", "295", "life", "294"}; String[][] descMatrix = { desk1,desk2,desk3,desk4,desk5,desk6,desk7,desk8,desk9,desk10,desk11 }; //float[] areas = new float[countries.length]; Country[] countryArray = new Country[countries.length/2]; Word[] wordArray = new Word[countries.length*15]; void setup() { bg = loadImage("oldPaper.jpg"); //font = createFont("UniversLTStd", fontSize); //font2 = createFont("UniversLTStd", 40); font = createFont("Courier", fontSize);//CourierNewPSMT font2 = createFont("Courier", 40); size(1260,700);//1200 spacer1 = (width/12)+0; println(spacer1); int spacerY = height/12; //bg.resize(width,height); background(255);//bg for(int ff = 0; ff