maps.turtletoy.net

An equirectangular projected map of the world (for use in other turtles?). Source image processed with a script to detect x-values for land/see edges per y-value (where y = 0 to 399 representation of longitude values (north-south), and x = 0 to 799 representation of latitude values (west-east)).

const world is an array of 400 arrays of pairs of x-values (defining land from-to per y-value). (x = 0, y = 0) = top left corner.

Source image: commons.wikimedia.org/wiki/File:World_map_with_nations.svg

Log in to post a comment.

Canvas.setpenopacity(.3);
const turtle = new Turtle();
const canvasSize = 200;
const height = 400;
const width = 800;

const ratio = Math.max(width / canvasSize, height / canvasSize);
const diffY = 100 - (height / (2*ratio));

for(var i = diffY; i <= 100; i += .02) {
    turtle.jump(-100, i); turtle.goto(100, i);
    turtle.jump(-100, -i); turtle.goto(100, -i);
}

// The walk function will be called until it returns false.
function walk(i) {
    var darks = world[Math.floor(i / ratio)];
    var y = (2 * diffY * i / (ratio * height)) - diffY;
    for(var j = 0; j < darks.length; j+=2) {
        turtle.jump( (darks[j] / ratio) - 100, y);
        turtle.goto( (darks[j + 1] / ratio) - 100, y);
    }
    return i < (height * ratio) - 1;
}

/* A map of the world (for use in other turtles?). Source image processed with a script to detect x-values for land/see edges per y-value (where y = 0 to 399 representation of longitude values (north-south), and x = 0 to 799 representation of latitude values (west-east)).

const world is an array of 400 arrays of pairs of x-values (defining land from-to per y-value). (x = 0, y = 0) = top left corner.

Source image: https://commons.wikimedia.org/wiki/File:World_map_with_nations.svg */
const world = [[],[],[],[],[],[],[],[],[],[],[],[],[],[],[315,339],[222,229,231,236,237,250,253,254,300,313,314,348],[220,263,288,289,301,351],[200,263,272,281,283,286,288,297,302,337,339,346],[198,251,253,255,265,270,271,344,347,352,362,372],[192,197,201,253,254,255,260,261,263,351,353,372],[189,198,201,203,211,222,224,250,252,253,254,348,350,367],[188,203,204,206,209,212,219,245,251,359,443,449,450,452,454,456],[186,207,209,244,252,254,256,361,427,430,433,434,436,440,442,461],[166,171,188,209,212,230,231,237,256,358,425,435,436,443,447,458],[166,176,192,208,210,212,214,215,216,234,247,357,426,447,448,454],[167,179,182,189,193,203,208,233,239,354,427,433,435,446],[151,156,169,171,176,181,183,189,211,232,239,353,431,443],[141,143,149,156,178,180,205,210,212,227,244,358,432,442,630,634],[133,143,204,227,242,361,433,440,626,635],[129,141,156,159,177,179,181,182,186,192,195,196,202,228,243,354,357,360,436,439,547,554,625,639,641,645,646,647],[128,135,143,148,149,150,156,160,174,184,189,192,194
,200,210,212,220,225,248,353,537,553,611,613,622,651],[142,153,157,166,173,184,195,202,212,220,268,358,531,547,606,653],[140,166,178,183,195,224,271,358,527,541,597,653],[147,157,160,164,196,222,272,355,526,535,594,652],[123,133,147,154,200,202,205,207,211,214,217,221,275,359,525,534,593,648],[124,142,177,179,182,185,189,199,276,356,521,530,592,593,595,644,646,647],[124,143,176,185,188,199,204,211,213,220,277,346,347,355,521,529,580,641,645,653,654,663,675,679],[123,140,142,147,155,156,160,165,173,174,178,183,188,198,202,209,211,222,278,340,351,352,519,526,579,665,674,686],[122,136,139,153,155,158,160,166,173,186,188,193,194,196,201,208,211,222,227,230,278,342,348,349,518,525,554,563,567,568,580,685,713,717],[121,134,136,159,161,167,174,186,189,192,201,209,211,221,222,225,226,235,277,352,517,524,553,563,567,569,574,578,582,683,710,724,727,731],[122,133,136,168,179,185,188,192,201,210,211,236,277,350,515,525,552,561,564,568,571,580,584,686,695,696,711,733],[51,53,125,130,139,169,180,182
,187,194,203,211,212,242,277,281,285,343,345,353,519,526,550,561,563,569,571,584,586,688,694,705,707,736],[45,61,138,169,186,195,203,244,246,248,280,283,286,339,347,353,455,457,459,460,461,463,464,466,520,527,549,562,565,583,586,690,692,738,742,753],[42,71,116,118,150,174,186,197,203,248,280,338,349,353,453,469,550,563,565,585,586,755],[38,85,106,112,115,119,123,124,128,129,140,176,187,196,209,221,222,226,228,251,279,351,447,468,549,562,564,755,779,784],[37,91,99,110,111,134,141,174,175,176,182,186,191,199,211,216,231,252,279,285,288,350,445,474,535,543,549,562,564,757,760,769,770,773,779,797],[35,95,98,105,107,139,144,145,148,162,166,174,180,188,191,200,202,204,211,220,231,250,251,252,288,345,440,481,535,547,552,562,565,568,569,776,780,799],[0,4,30,147,148,158,181,188,192,200,201,206,210,220,230,232,235,250,283,343,438,485,518,520,524,527,528,532,534,550,553,563,567,571,573,799],[0,7,30,147,164,168,182,186,190,205,210,218,230,233,237,252,285,334,335,336,437,487,498,503,513,520,522,564
,566,572,573,799],[0,11,34,158,161,183,184,187,188,205,209,219,229,234,239,258,282,286,288,329,435,491,499,504,508,563,566,572,573,799],[0,11,36,160,161,187,188,220,229,233,239,260,282,327,433,492,498,501,507,562,565,799],[0,12,13,20,41,219,238,264,282,326,431,492,499,560,564,799],[0,22,32,37,42,209,211,217,236,251,252,264,282,324,350,352,364,366,430,475,477,491,494,496,499,559,561,799],[0,23,27,209,236,251,255,262,282,316,317,321,348,353,355,357,358,368,429,478,484,488,492,799],[0,1,4,20,27,203,204,208,210,212,229,230,235,251,256,260,283,315,317,318,347,353,355,371,428,450,455,478,489,799],[0,1,9,17,30,207,209,216,227,253,258,260,285,312,351,371,427,448,456,477,482,484,489,799],[12,16,30,40,42,207,209,219,227,235,236,255,285,288,289,311,348,369,426,448,454,478,482,489,490,794,795,798],[42,205,208,221,229,232,238,256,285,286,287,310,351,368,423,448,453,481,484,796],[19,23,42,201,207,215,217,222,240,258,286,310,351,364,422,446,451,797],[20,24,35,37,38,199,211,213,241,249,252,257,288,309
,357,360,419,444,449,798],[34,199,243,252,255,257,289,308,416,442,448,799],[33,196,227,232,236,238,247,253,289,306,414,440,447,764,766,793,796,799],[31,194,227,240,251,254,291,307,412,439,448,763,765,791],[31,193,228,242,292,306,412,439,448,749,756,762,764,786],[34,65,66,71,72,192,227,246,293,306,412,439,448,748,756,759,764,784],[34,63,65,71,76,191,227,246,300,305,412,441,448,747,756,757,761,781],[34,61,64,71,79,190,229,246,256,258,301,305,413,443,451,457,464,745,759,768,769,772,777,779],[36,37,40,60,63,67,87,89,90,190,228,246,255,259,412,443,463,743,758,764,766,767],[40,59,63,65,91,190,227,246,255,260,412,442,453,731,737,744,756,763],[41,43,46,50,51,59,94,193,226,249,252,261,413,422,425,440,452,716,736,740,742,743,755,762],[50,58,98,100,102,194,227,250,251,261,389,394,413,420,426,438,453,714,753,761],[50,55,60,62,97,100,103,195,229,263,388,392,426,438,454,713,751,761],[49,53,57,62,99,101,104,195,230,263,388,396,421,424,427,438,448,452,454,711,749,763],[47,52,57,60,99,101,105,202,231,264
,387,396,419,423,427,437,448,709,748,762],[45,49,100,101,106,205,230,263,387,395,419,424,428,437,447,708,747,763],[44,48,104,105,107,207,230,265,388,395,418,424,428,436,447,706,746,761,762,763],[40,45,104,106,110,210,228,266,388,389,390,396,418,423,425,428,429,432,447,705,746,760],[36,41,105,107,110,218,226,269,382,387,389,397,419,422,426,428,447,702,746,760],[34,38,111,218,224,272,381,388,389,392,393,398,419,423,439,441,444,701,746,761],[34,35,111,218,224,273,378,388,393,400,420,425,427,430,436,704,746,757],[29,31,105,108,112,218,225,274,378,387,394,400,420,706,708,712,746,756],[26,28,105,107,114,218,225,277,378,387,393,401,413,713,716,718,747,756],[115,219,225,277,379,387,391,404,411,714,716,719,747,754],[116,219,226,277,378,387,391,405,410,412,413,714,715,719,747,753],[116,221,226,277,377,385,389,404,409,714,715,718,748,752],[117,222,224,275,276,277,379,382,389,403,408,714,716,718,748,751],[117,270,274,277,391,404,405,713,716,719,748,750],[115,119,120,269,273,276,389,401,404,713,716
,719],[116,122,123,254,257,260,263,265,272,275,388,390,391,393,403,713,716,720],[119,123,125,252,271,277,396,398,401,713,716,721],[120,125,126,251,254,257,271,281,396,713,716,721],[122,126,128,248,250,258,270,281,392,394,397,712,715,718,721,722],[123,126,128,246,248,258,270,282,390,712,716,718],[123,127,129,245,246,255,269,282,390,711,716,718],[124,244,245,257,273,275,277,283,393,710,715,718],[124,256,265,267,277,278,280,283,395,486,487,709,715,719],[124,257,264,267,396,470,471,481,485,512,519,708,715,720],[125,259,264,268,398,469,472,473,474,478,485,510,519,707,715,717],[125,267,398,467,474,478,484,508,518,706],[125,254,256,264,397,429,431,467,473,481,483,506,514,705,715,717],[124,252,255,262,397,428,431,432,434,466,475,479,483,505,513,704,715,718],[124,248,253,258,397,428,434,465,485,505,512,703,715,719],[124,247,253,257,397,418,423,430,435,464,488,507,514,702,715,723],[124,245,381,395,396,416,423,431,436,464,489,506,514,701,714,724],[124,244,380,408,412,415,424,432,439,463,491,507,515
,699,712,724],[124,243,381,408,420,422,425,432,440,462,492,507,517,692,711,720],[124,245,381,408,419,422,426,434,442,463,493,508,517,690,711,714,717,719],[124,245,380,407,420,421,428,437,443,464,472,480,493,509,517,519,521,689,712,714],[124,239,381,405,420,421,430,438,444,468,470,483,491,510,522,689,714,715],[124,236,381,403,419,422,432,441,444,455,457,462,464,512,518,670,671,688,712,715],[124,236,381,401,419,423,434,442,444,454,459,512,518,669,671,687,711,716],[125,236,380,401,419,422,435,438,440,442,444,451,458,511,519,667,670,685,711,716],[125,235,380,400,419,422,436,439,445,452,458,511,519,665,670,673,678,684,711,716],[126,234,379,401,420,421,436,439,446,452,460,510,520,662,670,671,679,685,711,716],[126,234,380,401,435,438,447,453,459,509,520,662,678,686,711,715],[127,233,381,399,428,431,432,437,448,454,459,509,520,665,677,687,710,714],[128,233,381,399,428,435,448,452,461,509,520,665,667,670,678,687,709,714],[128,232,381,397,420,423,431,435,448,452,461,512,521,673,682,688,704,706,707
,714],[129,232,386,395,407,425,433,434,450,452,462,513,519,672,681,688,704,714],[130,233,387,389,401,424,465,468,472,477,480,669,681,688,703,713],[131,233,387,389,398,425,480,667,682,688,702,713],[132,231,387,390,393,394,397,425,453,458,480,666,681,688,695,713],[132,231,386,425,455,459,480,665,681,687,694,710,711,712],[133,229,386,424,480,666,681,683,692,699,700,705,706,707],[136,228,385,423,479,667,691,694,697,699,701,704],[138,225,383,425,479,668,690,692,695,699,701,703],[139,224,381,427,478,669,688,693,694,697],[140,223,380,432,447,451,478,669,689,693,695,696],[140,221,380,435,445,452,477,670,690,693],[141,221,379,435,445,456,477,671,689,693],[141,145,148,220,379,438,445,462,467,472,476,671,689,692],[142,146,149,220,379,441,445,671],[143,146,149,220,379,442,444,669],[143,146,150,202,210,213,214,220,379,509,511,671],[144,147,151,191,194,196,197,202,215,220,378,507,513,671],[145,148,151,189,198,199,201,203,216,221,377,473,474,508,513,671],[147,149,152,188,217,222,375,473,475,508,514,671]
,[147,150,153,185,216,222,373,474,475,477,478,509,514,670],[145,151,154,185,217,222,371,475,479,509,516,669],[146,151,155,184,217,223,371,475,480,511,517,668],[147,152,156,184,217,223,370,476,480,512,519,524,527,667],[150,153,157,184,218,223,369,477,481,512,527,666],[151,153,157,185,219,223,368,477,482,512,514,515,525,526,528,666],[151,154,159,184,220,222,368,478,483,515,524,526,530,666],[151,154,160,184,221,222,367,478,483,515,523,526,536,541,549,665,669,671],[152,155,161,184,367,479,483,515,522,527,549,664,668,671],[153,156,162,183,366,480,484,516,517,528,550,663,668,671],[154,157,163,183,365,480,486,530,551,662,667,671],[155,158,164,183,365,480,486,531,552,660,667,670],[165,183,214,224,364,481,487,533,556,659,667,670],[165,183,213,216,218,227,363,482,487,534,555,602,604,653,668,669],[166,184,212,214,222,228,363,483,487,533,554,602,604,652],[48,50,166,184,201,207,225,231,362,483,487,532,555,561,562,595,605,641,642,649],[52,54,166,185,199,208,226,233,362,483,488,531,556,561,562,594,605
,639,644,646],[53,54,166,185,199,207,228,235,364,483,488,531,558,559,562,594,606,638,644,646],[54,55,166,186,199,206,228,236,238,239,242,243,364,483,490,529,562,593,607,637,645,647],[54,56,167,187,198,206,238,245,364,484,491,529,562,591,608,636,643,647],[54,56,168,187,198,206,239,247,364,484,492,529,562,589,609,635,642,646],[169,190,194,196,197,206,235,249,252,253,365,485,492,527,562,589,609,636,642,646],[171,205,227,231,235,243,244,245,247,249,251,255,365,486,493,526,562,588,610,637,642,644,668,672],[174,205,228,231,241,242,365,487,493,525,563,586,610,637,668,672],[175,205,364,487,494,523,563,585,610,638,668,673],[178,205,364,488,495,523,563,584,610,639,668,673],[181,204,364,488,495,518,564,583,610,615,617,640,667,672],[183,188,191,204,205,207,209,213,364,488,495,517,564,581,610,614,617,641,666,671],[193,214,363,489,495,516,564,579,617,642,667,670],[194,215,362,490,495,514,565,579,617,642,667,670],[195,216,362,492,496,511,565,579,618,643,668,671],[196,216,363,493,496,510,566,579,618,643
,669,674],[200,215,363,494,497,507,566,579,618,643,669,675],[202,215,363,495,497,504,567,579,619,623,624,643,668,670,674,676],[206,215,363,496,497,501,567,579,619,623,625,644,668,670],[207,215,241,242,363,497,567,579,619,623,627,643,669,670,677,679],[208,215,240,243,244,246,364,497,513,514,568,578,619,623,628,643,677,679],[209,214,238,241,244,248,366,497,511,515,568,578,620,622,629,643,671,674,678,680],[210,215,234,249,367,498,505,514,569,578,620,622,629,642,665,666,671,674],[210,215,233,254,258,262,263,265,368,499,501,514,569,578,619,621,631,640,665,666,671,675],[210,216,232,241,242,262,263,265,369,514,570,578,619,621,633,638,664,666,673,675],[211,217,224,225,232,241,243,265,370,514,570,576,619,621,634,638,663,664,672,674],[214,218,222,227,231,265,371,513,570,576,578,580,619,622,633,637,662,664,673,674,679,681],[215,224,225,228,230,265,371,513,571,575,577,581,619,623,633,635,661,663,677,681],[215,223,226,268,371,512,571,574,577,581,619,623,674,681],[219,222,226,270,372,512,578,582,620
,624,672,681],[220,223,227,271,373,511,578,582,621,624,671,674,676,681],[228,271,374,511,578,583,622,625,671,672,676,681],[228,273,376,510,578,582,622,627,659,662,675,679],[228,274,277,278,377,404,411,510,579,582,623,628,658,662,676,680],[228,282,378,402,412,509,612,613,623,629,657,664,678,680],[228,284,380,399,412,509,612,615,616,617,623,630,656,665],[229,285,381,387,395,397,413,508,612,618,624,630,655,664],[229,286,383,385,414,416,417,418,420,507,613,619,624,631,653,663],[229,287,421,506,614,620,624,631,652,662],[228,287,419,420,422,505,616,621,625,630,651,662],[228,288,422,505,617,623,625,630,650,661],[226,288,422,504,617,623,626,631,648,662],[225,289,422,502,618,625,628,632,647,663],[225,290,422,501,619,627,629,632,643,645,647,663,684,685],[224,290,421,499,620,628,642,664,669,670,677,678,683,687],[222,289,422,498,620,629,642,664,667,678,684,686],[222,288,421,497,621,631,642,662,666,677,684,686],[222,287,289,293,421,496,622,631,643,661,666,667,684,685],[221,286,288,293,294,296,420,495
,623,630,643,662,666,667,673,674,684,686,694,696],[220,285,288,292,293,299,420,494,623,632,643,661,665,668,670,674,692,699],[221,300,421,493,624,633,644,659,665,673,692,699],[221,302,421,493,624,633,634,636,645,659,665,671,694,699,705,709],[221,302,303,305,422,491,624,634,635,637,645,659,665,671,695,699,703,712],[223,312,423,490,625,638,645,659,664,672,685,687,694,700,702,715],[222,314,424,490,626,636,649,651,652,658,664,668,669,672,681,683,685,691,695,718],[221,315,425,489,627,636,655,658,665,668,669,672,681,683,690,691,695,720],[220,316,426,489,628,636,655,656,666,668,670,673,699,723],[219,318,427,489,629,636,666,668,670,672,702,724,737,739],[220,321,427,488,630,636,665,668,705,725,736,739],[220,322,427,487,631,636,665,667,707,725,730,738],[220,323,427,487,632,633,636,637,638,639,707,728,730,736],[221,323,428,488,635,641,646,647,708,729,733,735],[223,323,429,488,634,650,709,728],[223,323,429,489,637,651,709,727],[224,323,430,488,640,654,707,729],[225,323,430,488,646,657,662,664,668,669
,672,674,682,683,707,720,724,730],[225,323,430,488,653,654,655,657,660,665,667,673,678,683,712,719,725,730],[226,322,429,489,660,662,677,681,713,719,726,732],[226,321,430,489,665,668,675,679,727,733],[227,320,430,490,666,669,675,677,728,735],[227,319,431,491,733,735],[228,318,431,491,716,718],[228,318,431,491,694,696,716,718],[229,317,431,491,695,698,716,718],[229,317,430,491,691,705,715,719],[230,316,429,491,509,511,690,705,715,719],[231,314,429,491,509,512,690,704,715,720],[231,314,428,491,507,512,689,703,715,720],[231,314,428,491,507,512,681,684,688,703,715,720],[232,314,428,491,506,512,679,685,688,702,715,722],[233,314,427,491,505,513,678,702,715,723],[234,314,427,491,504,513,677,703,715,723],[235,314,427,490,501,512,677,705,714,724],[237,314,427,489,499,512,675,707,714,724],[239,314,427,488,499,511,673,674,675,709,714,724],[241,314,426,486,498,511,672,710,713,725],[242,314,427,484,498,511,672,725],[243,313,427,483,498,510,672,725],[244,312,427,481,499,510,671,726],[244,313,428,481
,499,510,670,726],[244,313,429,479,499,509,669,728],[244,312,429,478,499,509,665,730],[244,311,430,478,499,509,662,731],[244,311,430,479,498,508,659,732],[244,310,431,479,497,508,657,732],[244,310,431,479,497,508,656,733],[244,309,432,479,497,508,653,733],[244,308,432,480,497,507,653,735],[244,302,432,480,497,507,653,736],[244,301,432,480,497,507,653,736],[244,298,433,480,497,506,652,738],[244,296,433,479,498,506,652,739],[244,295,433,478,498,506,652,739],[244,293,433,475,499,503,653,740],[243,293,433,474,654,741],[243,293,434,473,652,741],[243,293,434,474,652,741],[243,293,434,474,653,741],[243,293,435,473,654,741],[242,293,436,473,654,742],[242,292,437,473,654,742],[242,291,437,472,655,742],[242,290,438,471,655,741],[242,290,438,470,655,741],[241,289,439,469,656,741],[241,289,439,468,656,741],[241,288,440,467,657,741],[241,285,286,287,441,466,657,741],[241,285,441,465,657,686,694,740],[242,285,441,464,657,681,698,739],[241,284,440,463,657,678,699,738],[241,283,441,462,657,676,699,706
,707,737],[241,282,441,460,656,675,700,705,707,737],[240,281,442,450,656,667,701,704,706,737],[240,272,274,280,444,446,658,664,701,703,705,707,708,736,784,786],[240,273,659,662,705,707,708,736,785,788],[239,273,708,735,786,789],[239,273,710,734,786,789],[238,274,711,734,787,789],[237,275,711,734,788,792],[237,274,711,734,789,792],[237,273,712,733,789,794,795,798],[237,272,714,722,723,729,789,798],[237,269,718,720,724,727,788,797],[238,262,787,795],[237,263,787,794],[236,262,790,794],[236,262,790,793],[236,256,258,261,722,726,727,730,783,785,789,792],[237,256,722,730,783,788,789,791],[236,238,239,257,723,730,781,788],[235,237,239,260,723,730,781,787],[235,237,239,257,724,729,780,786],[235,237,238,257,725,728,778,785],[238,256,776,784],[238,256,774,782],[239,255,773,781],[237,253,772,781],[237,251,771,780],[234,236,237,251,770,779],[233,252,774,778],[235,253],[235,255],[235,255],[236,253],[235,251],[235,251],[235,250],[236,249],[236,248],[236,247],[236,247],[237,248],[237,249],[237,249],[241
,243,244,249],[241,243,245,250],[245,252],[243,255],[251,255],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[272,273],[269,273],[265,272],[262,267],[259,265,699,700],[257,263,698,701],[255,262,517,523,626,630,648,654,698,701],[253,262,512,527,596,597,622,640,645,658,679,682,688,707],[251,258,512,528,595,661,668,683,687,716],[250,256,503,504,508,535,582,724],[250,255,500,547,548,555,579,726],[251,255,494,556,575,731],[251,259,475,477,490,556,574,736,742,744],[240,245,250,260,473,479,488,555,572,745],[240,246,248,261,470,484,488,555,567,754],[241,247,248,262,419,421,438,442,462,554,563,757],[240,263,415,423,428,449,455,551,561,762],[240,248,249,264,384,387,407,554,560,774],[236,249,250,264,373,375,377,380,383,393,396,398,402,552,559,777],[175,185,233,248,251,265,373,551,557,780],[173,187,234,237,240,248,251,265,374,552,555,779],[183,186,238,245,250,266,370,778],[170,184,189,196,200,204,221,223,243,265,366,777],[171,211,220,226,236,265,363,776],[145,149,172,264,363,366,367,769],[131,149
,152,155,174,263,365,767],[95,155,177,261,362,764,766,767],[84,259,360,762],[78,257,356,762],[68,226,229,251,341,762],[66,68,74,227,235,245,333,762],[50,61,66,68,75,231,330,763],[49,66,67,238,324,765],[49,221,230,237,292,299,322,768],[52,54,55,214,217,227,288,302,320,771],[37,44,55,216,218,228,287,303,319,763],[36,47,65,231,287,303,335,757],[39,47,70,230,280,303,336,756],[75,232,278,301,337,754],[74,237,278,294,320,321,325,757],[52,244,245,247,308,310,311,757],[56,254,306,761],[57,264,279,765],[61,268,275,769],[61,270,271,774],[60,782],[60,792],[0,16,61,799],[0,31,75,799],[0,44,57,65,67,799],[0,799],[0,799],[0,799],[0,799],[0,799],[0,799],[0,799],[0,799],[0,799],[0,799]];