#include "c:\Programme\POV-Ray for Windows v3.5\include\screen.inc" global_settings { charset utf8 } // 1 POV unit = 1 km #declare Planet_Radius=6377.5; #declare Planet_Center=<0, 0, 0>; #declare a=1; #declare d=0; #declare Orbit_Height=10; #declare StartLat=51; #declare StartLong=7; #declare PeriodFactor=0.958; // Stretch/squeeze factor for orbits #declare CamBeforeLat=StartLat*cos((clock-1)/20*(pi/180)); #declare CamBeforeLong=StartLong+(clock-1)/20*PeriodFactor; // Geographical coordinates of camera position in previous frame, for calculation of distance travelled #declare CamLat=StartLat*cos(clock/20*(pi/180)); #declare CamLong=StartLong+clock/20*PeriodFactor; // Geographical coordinates of current camera position #declare CamLookLat=StartLat*cos((clock+1)/20*(pi/180)); #declare CamLookLong=StartLong+(clock+1)/20*PeriodFactor; // Geographical coordinates of camera position in next frame, used as look_at vector in current frame #declare CamBeforeLongGeo=-CamBeforeLong-90; #declare CamLongGeo=-CamLong-90; #declare CamLookLongGeo=-CamLookLong-90; // Adjusting geographical latitudes to POV-Ray's spherical bitmap projection #declare CamBefore=Planet_Center+ (Planet_Radius+Orbit_Height)*; #declare CamPos=Planet_Center+ (Planet_Radius+Orbit_Height)*; #declare CamLook=Planet_Center+ (Planet_Radius+Orbit_Height)*; // Illumination currently deactivated, will change in future versions /* light_source // The central star { <0, 0, -10000000> color rgb 1 looks_like { sphere { 0, SunRad texture { Star_A } pigment { color rgb 1 } finish { ambient 1 diffuse 1 } } } } */ #declare Coords=array[180][6] { {24, 28, 54, 22, 1, 1} // Abu Dhabi { 9, 12, 7, 11, 1, 1} // Abuja { 5, 33, 0, 13, 1, 0} // Accra { 9, 2, 38, 42, 1, 1} // Addis Abeba {26, 13, 50, 35, 1, 1} // Al-Manamah {36, 47, 3, 3, 1, 1} // Algiers {31, 57, 35, 56, 1, 1} // Amman {52, 22, 4, 34, 1, 1} // Amsterdam {42, 30, 1, 31, 1, 1} // Andorra {39, 56, 32, 52, 1, 1} // Ankara {13, 50, 171, 44, 0, 0} // Apia {37, 57, 58, 23, 1, 1} // Ashgabat {15, 20, 38, 53, 1, 1} // Asmara {25, 16, 58, 27, 0, 0} // Asuncion {37, 58, 23, 43, 1, 1} // Athens {33, 21, 44, 25, 1, 1} // Baghdad {40, 23, 49, 51, 1, 1} // Baku {12, 39, 8, 0, 1, 0} // Bamako {13, 45, 100, 31, 1, 1} // Bangkok { 4, 22, 18, 35, 1, 1} // Bangui {13, 28, 16, 39, 1, 0} // Banjul {17, 18, 62, 43, 1, 0} // Basseterre {39, 55, 116, 25, 1, 1} // Beijing {33, 53, 35, 30, 1, 1} // Beirut {44, 50, 20, 30, 1, 1} // Belgrade {17, 15, 88, 46, 1, 0} // Belmopan {52, 31, 13, 24, 1, 1} // Berlin {46, 57, 7, 26, 1, 1} // Bern {42, 54, 74, 36, 1, 1} // Bishkek {11, 51, 15, 35, 1, 0} // Bissau { 4, 36, 74, 5, 1, 0} // Bogota {15, 47, 47, 55, 0, 0} // Brasilia {48, 9, 17, 7, 1, 1} // Bratislava { 4, 16, 15, 17, 0, 1} // Brazzaville {13, 6, 59, 37, 1, 0} // Bridgetown {50, 50, 4, 20, 1, 1} // Brussels {44, 26, 26, 6, 1, 1} // Bucharest {47, 30, 19, 5, 1, 1} // Budapest {34, 36, 58, 27, 0, 0} // Buenos Aires { 3, 23, 29, 22, 0, 1} // Bujumbara {30, 3, 31, 15, 1, 1} // Cairo {35, 17, 149, 8, 0, 1} // Canberra {10, 30, 66, 56, 1, 0} // Caracas {14, 1, 61, 0, 1, 0} // Castries {47, 0, 28, 50, 1, 1} // Chisinau { 6, 56, 79, 51, 1, 1} // Colombo { 9, 31, 13, 43, 1, 0} // Conakry {55, 40, 12, 35, 1, 1} // Copenhagen {23, 43, 90, 25, 1, 1} // Dacca {14, 40, 17, 26, 1, 0} // Dakar {33, 30, 36, 18, 1, 1} // Damascus { 8, 33, 125, 35, 0, 1} // Dili {11, 36, 43, 9, 1, 1} // Djibouti { 6, 11, 35, 45, 0, 1} // Dodoma {25, 17, 51, 32, 0, 1} // Doha {53, 20, 6, 15, 1, 0} // Dublin {38, 55, 68, 48, 1, 1} // Dushanbe { 8, 30, 13, 15, 1, 0} // Freetown { 8, 31, 179, 13, 0, 1} // Funafuti {24, 45, 25, 55, 0, 1} // Gaborone { 6, 48, 58, 10, 1, 0} // Georgetown {14, 38, 90, 31, 1, 0} // Guatemala {17, 50, 31, 3, 0, 1} // Harare {23, 8, 82, 22, 1, 0} // Havana {60, 10, 24, 38, 1, 1} // Helsinki { 9, 26, 159, 57, 0, 1} // Honiara {33, 42, 73, 10, 1, 1} // Islamabad { 6, 10, 106, 48, 0, 1} // Jakarta {31, 46, 35, 14, 1, 1} // Jerusalem {34, 31, 69, 12, 1, 1} // Kabul { 0, 19, 32, 25, 1, 1} // Kampala {27, 43, 85, 19, 1, 1} // Kathmandu {15, 36, 32, 32, 1, 1} // Khartum {50, 26, 30, 31, 1, 1} // Kiev { 1, 57, 30, 4, 0, 1} // Kigali {18, 0, 76, 48, 1, 0} // Kingston {13, 9, 61, 14, 1, 0} // Kingstown { 4, 18, 15, 18, 0, 1} // Kinshasa { 3, 10, 101, 42, 1, 1} // Kuala Lumpur {29, 20, 47, 59, 1, 1} // Kuwait City {16, 30, 68, 9, 0, 0} // La Paz { 0, 23, 9, 27, 1, 1} // Libreville {13, 59, 33, 44, 0, 1} // Lilongwe {12, 3, 77, 3, 0, 0} // Lima {38, 43, 9, 8, 1, 0} // Lisbon {46, 3, 14, 31, 1, 1} // Ljubljana { 6, 8, 1, 18, 1, 1} // Lomé {51, 30, 0, 10, 1, 0} // London { 8, 48, 13, 14, 0, 1} // Luanda {15, 25, 28, 17, 0, 1} // Lusaka {49, 36, 6, 9, 1, 1} // Luxemburg {40, 24, 3, 41, 1, 0} // Madrid { 3, 45, 8, 47, 1, 1} // Malabo {12, 9, 86, 17, 1, 0} // Managua {14, 35, 121, 0, 1, 1} // Manila {25, 58, 32, 35, 0, 1} // Maputo {29, 28, 27, 30, 0, 1} // Maseru {23, 37, 58, 35, 1, 1} // Masqat {26, 18, 31, 6, 0, 1} // Mbabane {19, 24, 99, 9, 1, 0} // Mexico City {53, 54, 27, 34, 1, 1} // Minsk { 2, 4, 45, 22, 1, 1} // Mogadishu {43, 42, 7, 23, 1, 1} // Monaco { 6, 18, 10, 47, 1, 0} // Monrovia {34, 53, 56, 11, 0, 0} // Montevideo {55, 45, 37, 35, 1, 1} // Moscow { 1, 17, 36, 49, 0, 1} // Nairobi {25, 5, 77, 21, 1, 0} // Nassau {12, 07, 15, 3, 1, 1} // Ndjamena {28, 36, 77, 12, 1, 1} // New Delhi {13, 31, 2, 7, 1, 1} // Niamey {18, 6, 15, 57, 1, 0} // Nouakchott {21, 8, 175, 12, 0, 0} // Nuku'alofa {59, 55, 10, 45, 1, 1} // Oslo {45, 25, 75, 42, 1, 0} // Ottawa {12, 22, 1, 31, 1, 0} // Ouagadougou { 8, 58, 79, 32, 1, 0} // Panamá { 5, 50, 55, 10, 1, 0} // Paramaribo {48, 52, 2, 20, 1, 1} // Paris {11, 33, 104, 55, 1, 1} // Phnomh Penh {18, 32, 72, 20, 1, 0} // Port-au-Prince { 9, 30, 147, 10, 1, 1} // Port Moresby {10, 39, 61, 31, 1, 0} // Port of Spain { 6, 29, 2, 37, 1, 1} // Porto-Novo {17, 44, 168, 19, 0, 1} // Port-Vila {50, 5, 14, 26, 1, 1} // Prague {14, 55, 23, 31, 1, 0} // Praia {25, 45, 28, 10, 0, 1} // Pretoria {39, 1, 125. 45, 1, 1} // Pyöngyang { 0, 13, 78, 30, 0, 0} // Quito {34, 2, 6, 51, 1, 0} // Rabat {16, 47, 96, 10, 1, 1} // Rangoon {64, 9, 21, 51, 1, 0} // Reykjavik {56, 57, 24, 6, 1, 1} // Riga {24, 38, 46, 43, 1, 1} // Riyadh {41, 54, 12, 29, 1, 1} // Rome {15, 18, 61, 24, 1, 0} // Roseau {10, 45, 106, 40, 1, 1} // Saigon {15, 23, 44, 12, 1, 1} // San'a { 9, 56, 84, 5, 1, 0} // San José {43, 55, 12, 28, 1, 1} // San Marino {13, 42, 89, 12, 1, 0} // San Salvador {33, 27, 70, 40, 0, 0} // Santiago de Chile {18, 28, 69, 54, 1, 0} // Santo Domingo {43, 52, 18, 25, 1, 1} // Sarajewo { 0, 20, 6, 44, 1, 1} // Sao Tomé {37, 33, 126, 58, 1, 1} // Seoul {41, 59, 21, 26, 1, 1} // Skopje { 1, 17, 103, 51, 1, 1} // Singapore {42, 41, 23, 19, 1, 1} // Sofia {12, 3, 61, 45, 1, 0} // St. George's {17, 6, 61, 31, 1, 0} // St. John's {59, 20, 18, 3, 1, 1} // Stockholm {18, 8, 173, 25, 0, 1} // Suva {25, 3, 121, 30, 1, 1} // Taipeh {59, 25, 24. 45, 1, 1} // Tallinn {41, 20, 69, 18, 1, 1} // Tashkent {41, 43, 44, 49, 1, 1} // Tbilisi {14, 6, 87, 13, 1, 0} // Tegucigalpa {35, 40, 51, 26, 1, 1} // Tehran {27, 28, 89, 39, 1, 1} // Thimphu {41, 20, 19, 50, 1, 1} // Tirana {35, 42, 139, 46, 1, 1} // Tokyo {32, 54, 13, 11, 1, 1} // Tripolis {36, 48, 10, 11, 1, 1} // Tunis {47, 55, 106, 53, 1, 1} // Ulan-Bator {47, 9, 9, 31, 1, 1} // Vaduz {35, 54, 14, 31, 1, 1} // Valetta {48, 13, 16, 20, 1, 1} // Vienna {17, 58, 102, 36, 1, 1} // Vientiane {54, 41, 25, 19, 1, 1} // Vilnius {52, 15, 21, 0, 1, 1} // Warsaw {38, 53, 77, 2, 1, 0} // Washington, D. C. {41, 18, 174, 47, 0, 1} // Wellington {22, 34, 17, 6, 0, 1} // Windhoek { 6, 49, 5, 17, 1, 0} // Yamoussoukro { 0, 31, 166, 54, 0, 1} // Yangor { 3, 52, 11, 31, 1, 1} // Yaoundé {40, 11, 44, 30, 1, 1} // Yerevan {45, 48, 15, 58, 1, 1} // Zagreb } // Geographical coordinates (unsigned) of the world's capitals (in alphabetical order), // format: LAT°, LAT', LONG°, LONG', sign LAT (0=south, 1=north), sign LONG (0=west, 1=east) #declare sc=dimension_size(Coords, 1); #declare Names=array[sc] { "Abu Dhabi", "Abuja", "Accra", "Addis Abeba", "Al-Manamah", "Algiers", "Amman", "Amsterdam", "Andorra", "Ankara", "Apia", "Ashgabat", "Asmara", "Asuncion", "Athens", "Baghdad", "Baku", "Bamako", "Bangkok", "Bangui", "Banjul", "Basseterre", "Beijing", "Beirut", "Belgrade", "Belmopan", "Berlin", "Bern", "Bishkek", "Bissau", "Bogota", "Brasilia", "Bratislava", "Brazzaville", "Bridgetown", "Brussels", "Bucharest", "Budapest", "Buenos Aires", "Bujumbara", "Cairo", "Canberra", "Caracas", "Castries", "Chisinau", "Colombo", "Conakry", "Copenhagen", "Dacca", "Dakar", "Damascus", "Dili", "Djibouti", "Dodoma", "Doha", "Dublin" "Dushanbe", "Freetown", "Funafuti", "Gaborone", "Georgetown", "Guatemala", "Harare", "Havana", "Helsinki", "Honiara", "Islamabad", "Jakarta", "Jerusalem", "Kabul", "Kampala", "Kathmandu", "Khartum", "Kiev", "Kigali", "Kingston", "Kingstown", "Kinshasa", "Kuala Lumpur", "Kuwait City", "La Paz", "Libreville", "Lilongwe", "Lima" "Lisbon", "Ljubljana", "Lome", "London", "Luanda", "Lusaka", "Luxemburg", "Madrid", "Malabo", "Managua", "Manila", "Maputo", "Maseru", "Masqat", "Mbabane", "Mexico City", "Minsk", "Mogadishu", "Monaco", "Monrovia", "Montevideo", "Moscow", "Nairobi", "Nassau", "Ndjamena", "New Delhi", "Niamey", "Nouakchott", "Nuku'alofa", "Oslo", "Ottawa", "Ouagadougou", "Panama", "Paramaribo", "Paris", "Phnomh Penh", "Port-au-Prince", "Port Moresby", "Port of Spain", "Porto-Novo", "Port-Vila", "Prague", "Praia", "Pretoria", "Pyöngyang", "Quito", "Rabat", "Rangoon", "Reykjavik", "Riga", "Riyadh", "Rome", "Roseau", "Saigon", "San'a", "San Jose" "San Marino", "San Salvador", "Santiago de Chile", "Santo Domingo", "Sarajevo", "Sao Tome", "Seoul", "Skopje", "Singapore", "Sofia", "St. George's", "St. John's", "Stockholm", "Suva", "Taipeh", "Tallinn", "Tashkent", "Tbilisi", "Tegucigalpa", "Tehran", "Thimphu", "Tirana", "Tokyo", "Tripolis", "Tunis", "Ulan-Bator", "Vaduz", "Valetta", "Vienna", "Vientiane", "Vilnius", "Warsaw", "Washington, D. C.", "Wellington", "Windhoek", "Yamoussoukro", "Yangor", "Yaounde", "Yerevan", "Zagreb" } // Names of the world's capital in alphabetical order; // mostly English versions #declare Dists=array[sc][2] #declare i=0; #while (i; #declare Dists[i][1]=acos(vdot(Pos, CamPos)/(vlength(Pos)*vlength(CamPos)))*(Planet_Radius+Orbit_Height); #declare i=i+1; #end // Calculation of current distance to each capital #macro sort(field, l, r) // QUICKSORT for PoV-Ray! #local m=field[(l+r)/2][1]; #local i=l; #local j=r; #while(i<=j) #while (field[i][1]m) #local j=j-1; #end #if (i<=j) #local buf=field[i][1]; #local buf2=field[i][0]; #declare field[i][1]=field[j][1]; #declare field[i][0]=field[j][0]; #declare field[j][1]=buf; #declare field[j][0]=buf2; #local i=i+1; #local j=j-1; #end #end #if (l0) #while (a<=clock) #declare CamLatIni=StartLat*cos(a/20*(pi/180)); #declare CamLongIni=a/20*PeriodFactor; #declare CamLatIni2=StartLat*cos((a-1)/20*(pi/180)); #declare CamLongIni2=(a-1)/20*PeriodFactor; #declare CamLongIniGeo=-CamLongIni-90; #declare CamLongIni2Geo=-CamLongIni2-90; #declare d=d+vlength(Planet_Center+ (Planet_Radius+Orbit_Height)* -(Planet_Center+ (Planet_Radius+Orbit_Height)*)); #declare a=a+1; #end #end Screen_Object ( text // preferably use a block font rather than a proportional one! { ttf "c:\windows\fonts\lucon.ttf" concat("Distance travelled: ", str(d, 6, 2), " kms") 0.0001, 0 texture { pigment { color rgb <1, 0, 0> } finish { ambient 1 } } scale 0.05 } <0.18, 0.94>, <0, 0>, false, 10 ) Screen_Object ( text { ttf "c:\windows\fonts\lucon.ttf" concat("Long: ", #if(int(mod(CamLong, 360)-359)=0) "-", #end str( #if (mod(CamLong, 360)<=180) int(mod(CamLong, 360)), 3, #else int(mod(CamLong, 360))-359, #if(int(mod(CamLong, 360)-359)=0) 1, #else 4, #end #end 0), "°", str( #if (mod(CamLong, 360)<=180) (CamLong-int(CamLong))*60, #else (1-(CamLong-int(CamLong)))*60, #end -2, 0),"'") 0.0001, 0 texture { pigment { color rgb <1, 0, 0> } finish { ambient 1 } } scale 0.05 } <0.01, 0.88>, <0, 0>, false, 10 ) Screen_Object ( text { ttf "c:\windows\fonts\lucon.ttf" concat("Lat: ", #if (CamLat<0 & CamLat>-1) "-", #end #if (abs((CamLat-int(CamLat))*60)>=59.5) str(int(CamLat)+(CamLat/abs(CamLat)), 2, 0), "°", "00", #else str(int(CamLat), 2, 0), "°", str(abs((CamLat-int(CamLat))*60), -2, 0), #end "'") 0.0001, 0 texture { pigment { color rgb <1, 0, 0> } finish { ambient 1 } } scale 0.05 } <0.72, 0.88>, <0, 0>, false, 10 ) #declare n1=0; #while (n1<6) Screen_Object ( text { ttf "c:\windows\fonts\lucon.ttf" Names[Dists[n1][0]] 0.0001, 0 texture { pigment { color rgb <1, 0, 0> } finish { ambient 1 } } scale 0.045 } <0.16, 0.82-n1*0.05>, <0, 0>, false, 10 ) Screen_Object ( text { ttf "c:\windows\fonts\lucon.ttf" concat(str(Dists[n1][1], 9, 3), " kms") 0.0001, 0 texture { pigment { color rgb <1, 0, 0> } finish { ambient 1 } } scale 0.045 } <0.6, 0.82-n1*0.05>, <0, 0>, false, 10 ) #declare n1=n1+1; #end