--[[
	
	Project trains
	Creator: IIYAMA
	File: client.lua
	
	You are free to modify this file to your needs.
	
]]





--[[
	This is a recorded of the traintrack, the points are based on locations where the train is turning.
]]
local trainLocationTable = {{2808.9873046875, 1609.1640625, 11.247308731079},{2814.8659667969, 1601.9731445313, 11.247308731079},{2820.29296875, 1595.7038574219, 11.247308731079},{2821.4096679688, 1594.4326171875, 11.247308731079},{2826.7900390625, 1588.1369628906, 11.247308731079},{2827.3115234375, 1587.4602050781, 11.247308731079},{2832.787109375, 1580.0717773438, 11.247308731079},{2833.2578125, 1579.3662109375, 11.247308731079},{2833.7080078125, 1578.6555175781, 11.247308731079},{2838.0756835938, 1571.7110595703, 11.247308731079},{2838.8942871094, 1570.2528076172, 11.247308731079},{2843.6518554688, 1561.5297851563, 11.247308731079},{2847.6767578125, 1553.2797851563, 11.247308731079},{2847.9916992188, 1552.537109375, 11.247308731079},{2851.5659179688, 1544.0268554688, 11.247308731079},{2854.7629394531, 1535.3419189453, 11.247308731079},{2855.0029296875, 1534.5798339844, 11.247308731079},{2857.689453125, 1525.7957763672, 11.247308731079},{2859.9968261719, 1517.0344238281, 11.247308731079},{2860.1760253906, 1516.2170410156, 11.247308731079},{2861.9052734375, 1508.1761474609, 11.247308731079},{2862.0393066406, 1507.3420410156, 11.247308731079},{2863.2006835938, 1500.0269775391, 11.247308731079},{2863.294921875, 1499.1773681641, 11.247308731079},{2864.1625976563, 1490.8924560547, 11.247308731079},{2864.4506835938, 1486.6954345703, 11.247308731079},{2864.75, 1478.4217529297, 11.247308731079},{2864.75, 1477.5717773438, 11.247308731079},{2864.6713867188, 1226.6982421875, 11.241680145264},{2863.923828125, 1218.3442382813, 11.188285827637},{2863.7719726563, 1217.4851074219, 11.177980422974},{2863.578125, 1216.6518554688, 11.172667503357},{2861.6577148438, 1208.4758300781, 11.122308731079},{2861.4187011719, 1207.669921875, 11.122308731079},{2860.6979980469, 1205.3005371094, 11.122308731079},{2857.8527832031, 1196.6811523438, 11.122308731079},{2856.1257324219, 1191.9133300781, 11.122308731079},{2852.8217773438, 1183.3706054688, 11.122308731079},{2849.9968261719, 1176.556640625, 11.127473831177},{2846.6635742188, 1168.9005126953, 11.161104202271},{2839.5883789063, 1153.7349853516, 11.247308731079},{2835.1435546875, 1144.7469482422, 11.247308731079},{2826.6394042969, 1128.5482177734, 11.247308731079},{2817.4243164063, 1111.9194335938, 11.247308731079},{2812.8198242188, 1104.0130615234, 11.247308731079},{2807.5791015625, 1095.3637695313, 11.253639221191},{2807.1330566406, 1094.6975097656, 11.264984130859},{2802.4521484375, 1087.7624511719, 11.392459869385},{2784.080078125, 1062.9655761719, 12.242045402527},{2778.681640625, 1055.5593261719, 12.172727584839},{2776.2744140625, 1052.16796875, 12.026356697083},{2775.8217773438, 1051.4500732422, 12.006379127502},{2771.412109375, 1044.3776855469, 11.818768501282},{2770.2241210938, 1042.1850585938, 11.79102897644},{2769.9279785156, 1041.498046875, 11.772575378418},{2766.6381835938, 1033.7906494141, 11.561456680298},{2766.4306640625, 1032.9721679688, 11.53727722168},{2766.28125, 1032.1977539063, 11.521759033203},{2765.2250976563, 1026.5227050781, 11.408279418945},{2764.9174804688, 1024.0690917969, 11.372308731079},{2764.8923339844, 1023.27734375, 11.372308731079},{2764.75, 1018.3243408203, 11.372308731079},{2764.75, 1017.4742431641, 11.372308731079},{2764.7626953125, 737.85119628906, 11.315710067749},{2765.2861328125, 467.41174316406, 8.6805801391602},{2764.9379882813, 445.81631469727, 8.414478302002},{2764.875, 436.65908813477, 8.3292636871338},{2764.9665527344, 402.13189697266, 8.1223087310791},{2765.3039550781, 382.15747070313, 8.1223087310791},{2765.3505859375, 373.00494384766, 8.1223087310791},{2765.2229003906, 343.71417236328, 8.1764793395996},{2765.2451171875, 299.52972412109, 8.6886558532715},{2765.3017578125, 298.78088378906, 8.6936779022217},{2765.962890625, 290.39343261719, 8.7473087310791},{2766.0874023438, 289.5458984375, 8.7473087310791},{2766.7321777344, 285.42272949219, 8.7618951797485},{2766.8930664063, 284.64208984375, 8.7789421081543},{2768.6193847656, 276.51232910156, 8.9755535125732},{2770.1611328125, 270.9309387207, 9.2138862609863},{2772.6726074219, 263.03564453125, 9.4742946624756},{2772.9489746094, 262.27716064453, 9.4911499023438},{2780.1755371094, 242.47355651855, 9.9553508758545},{2783.0927734375, 234.63873291016, 10.291337966919},{2791.5751953125, 212.21656799316, 11.660678863525},{2791.8513183594, 211.41351318359, 11.732776641846},{2794.5263671875, 203.56237792969, 12.45584487915},{2800.470703125, 184.33302307129, 14.739573478699},{2804.6811523438, 170.84414672852, 16.55445098877},{2809.4013671875, 156.68646240234, 18.47447013855},{2811.8271484375, 148.7760925293, 19.586881637573},{2812.7006835938, 145.54360961914, 20.06102180481},{2814.9399414063, 136.60952758789, 21.336263656616},{2816.048828125, 131.67109680176, 22.017919540405},{2817.6606445313, 123.43126678467, 23.125839233398},{2817.7973632813, 122.59331512451, 23.235137939453},{2820.0583496094, 108.64515686035, 25.023027420044},{2821.2885742188, 100.42289733887, 25.829172134399},{2821.3969726563, 99.635971069336, 25.883272171021},{2822.8588867188, 88.95499420166, 26.603710174561},{2824.0151367188, 79.841903686523, 27.032312393188},{2825.3911132813, 68.07398223877, 27.380975723267},{2826.1784667969, 58.920192718506, 27.660688400269},{2827.2666015625, 39.852069854736, 28.267393112183},{2827.5239257813, 30.671052932739, 28.653348922729},{2827.9916992188, -76.798301696777, 34.049095153809},{2828.1130371094, -85.913055419922, 34.303817749023},{2828.1469726563, -89.24243927002, 34.343826293945},{2828.0402832031, -97.501022338867, 34.477165222168},{2828.00390625, -98.348098754883, 34.495384216309},{2827.8588867188, -100.84706115723, 34.520416259766},{2827.2275390625, -108.35921478271, 34.479644775391},{2827.1040039063, -109.20040893555, 34.463882446289},{2826.974609375, -109.99481201172, 34.438835144043},{2825.83984375, -116.63171386719, 34.214683532715},{2825.6530761719, -117.35359954834, 34.180000305176},{2823.5185546875, -125.42520141602, 33.773330688477},{2823.2412109375, -126.22532653809, 33.716606140137},{2820.2138671875, -134.82855224609, 33.101387023926},{2817.7229003906, -141.00927734375, 32.616470336914},{2808.6049804688, -162.55908203125, 30.835594177246},{2808.2495117188, -163.3309173584, 30.763954162598},{2804.3959960938, -171.62542724609, 29.984443664551},{2794.40625, -191.7214050293, 27.917409896851},{2790.1264648438, -199.8069152832, 27.057010650635},{2774.9611816406, -227.60952758789, 23.988697052002},{2760.796875, -254.10917663574, 20.905536651611},{2757.4868164063, -259.77630615234, 20.214462280273},{2757.0075683594, -260.48370361328, 20.136896133423},{2755.56640625, -262.54516601563, 19.90424156189},{2752.5979003906, -266.57928466797, 19.432537078857},{2752.06640625, -267.16400146484, 19.360473632813},{2751.4636230469, -267.77386474609, 19.291172027588},{2747.3125, -271.88748168945, 18.821920394897},{2746.6455078125, -272.41455078125, 18.758289337158},{2745.9357910156, -272.88043212891, 18.694658279419},{2741.0385742188, -276.03668212891, 18.264820098877},{2739.5791015625, -276.76318359375, 18.164113998413},{2733.4526367188, -279.37725830078, 17.77537727356},{2732.6528320313, -279.65551757813, 17.729742050171},{2724.0297851563, -282.61828613281, 17.230485916138},{2715.2080078125, -285.18493652344, 16.761520385742},{2699.0322265625, -289.16149902344, 16.041137695313},{2697.41796875, -289.48361206055, 15.970077514648},{2690.0732421875, -290.91275024414, 15.647232055664},{2676.0732421875, -293.01889038086, 15.043418884277},{2675.33203125, -293.10125732422, 15.017301559448},{2667.0263671875, -293.99206542969, 14.731130599976},{2652.9985351563, -294.95199584961, 14.356764793396},{2652.1513671875, -294.97283935547, 14.341012954712},{2643.826171875, -295.14129638672, 14.192962646484},{2628.8002929688, -294.81958007813, 14.044452667236},{2628.05078125, -294.78106689453, 14.046379089355},{2619.6586914063, -294.330078125, 14.076038360596},{2618.861328125, -294.26434326172, 14.088369369507},{2603.8598632813, -293.00357055664, 14.332136154175},{2595.572265625, -292.13403320313, 14.553470611572},{2594.7224121094, -292.02777099609, 14.58472442627},{2587.2314453125, -291.07196044922, 14.860219955444},{2578.2143554688, -289.68530273438, 15.193078041077},{2570.0720214844, -288.24859619141, 15.49111366272},{2561.02734375, -286.76062011719, 15.786949157715},{2544.4033203125, -284.29861450195, 16.317140579224},{2527.119140625, -281.97955322266, 16.883274078369},{2512.240234375, -280.04608154297, 17.315273284912},{2503.1311035156, -278.86807250977, 17.573661804199},{2494.0437011719, -277.75570678711, 17.755014419556},{2470.7106933594, -275.24884033203, 18.293704986572},{2462.4448242188, -274.53228759766, 18.457986831665},{2426.7192382813, -272.06707763672, 18.957717895508},{2425.8693847656, -272.04013061523, 18.961513519287},{2417.5278320313, -271.78839111328, 18.997308731079},{2416.7426757813, -271.79476928711, 18.997308731079},{2410.9990234375, -271.85043334961, 19.004858016968},{2410.1577148438, -271.88491821289, 19.028184890747},{2401.943359375, -272.23693847656, 19.268774032593},{2401.095703125, -272.29916381836, 19.315427780151},{2396.9643554688, -272.64953613281, 19.538534164429},{2388.7106933594, -273.78286743164, 19.944673538208},{2387.8774414063, -273.94952392578, 19.980897903442},{2382.9814453125, -274.9521484375, 20.207437515259},{2382.2106933594, -275.16986083984, 20.278059005737},{2374.1748046875, -277.47930908203, 21.037424087524},{2373.3701171875, -277.77532958984, 21.151275634766},{2368.6494140625, -279.54608154297, 21.813173294067},{2360.875, -282.64004516602, 22.871015548706},{2356.9890136719, -284.31243896484, 23.391958236694},{2356.2678222656, -284.65924072266, 23.505002975464},{2348.7563476563, -288.30523681641, 24.697675704956},{2344.3891601563, -290.69079589844, 25.50407409668},{2336.515625, -295.33233642578, 27.019208908081},{2324.5568847656, -303.1123046875, 29.451080322266},{2297.125, -321.58215332031, 35.085929870605},{2285.8942871094, -328.97018432617, 37.144554138184},{2278.0947265625, -333.72100830078, 38.256332397461},{2274.4777832031, -335.75946044922, 38.665565490723},{2266.4091796875, -340.02014160156, 39.602142333984},{2261.876953125, -342.20629882813, 40.125854492188},{2254.1640625, -345.57012939453, 40.925575256348},{2253.4096679688, -345.86157226563, 40.994148254395},{2251.0554199219, -346.73669433594, 41.212913513184},{2243.2055664063, -349.49426269531, 41.964263916016},{2239.3051757813, -350.72964477539, 42.360496520996},{2238.4799804688, -350.95483398438, 42.462043762207},{2230.3559570313, -353.14892578125, 43.472946166992},{2229.552734375, -353.33282470703, 43.589080810547},{2228.7133789063, -353.50305175781, 43.704460144043},{2219.7043457031, -355.28607177734, 44.930610656738},{2217.275390625, -355.68151855469, 45.251106262207},{2216.4384765625, -355.78274536133, 45.372550964355},{2208.2075195313, -356.744140625, 46.577819824219},{2196.5568847656, -357.56475830078, 48.451103210449},{2195.7084960938, -357.59252929688, 48.589965820313},{2187.42578125, -357.84442138672, 49.947189331055},{2186.5791015625, -357.83923339844, 50.088287353516},{2175.7666015625, -357.75427246094, 51.881309509277},{2166.5786132813, -357.47094726563, 53.29963684082},{2155.6245117188, -356.93432617188, 54.86190032959},{2147.3276367188, -356.62768554688, 55.892082214355},{2135.740234375, -356.3713684082, 57.112312316895},{2126.6115722656, -356.53515625, 58.035972595215},{2114.0639648438, -357.21374511719, 59.264503479004},{2104.8974609375, -358.05969238281, 60.192901611328},{2102.404296875, -358.39129638672, 60.453338623047},{2101.5673828125, -358.53295898438, 60.541893005371},{2093.3579101563, -359.95391845703, 61.411766052246},{2090.1635742188, -360.67279052734, 61.759056091309},{2081.2810058594, -362.92935180664, 62.755561828613},{2078.1254882813, -363.8678894043, 63.120277404785},{2070.26171875, -366.43200683594, 64.025932312012},{2066.4382324219, -367.86560058594, 64.462692260742},{2058.0712890625, -371.55328369141, 65.400192260742},{2054.3635253906, -373.47613525391, 65.809761047363},{2046.9982910156, -377.53509521484, 66.633857727051},{2044.1497802734, -379.24993896484, 66.954650878906},{2043.4619140625, -379.74697875977, 67.024482727051},{2036.7362060547, -384.66830444336, 67.701637268066},{2036.1362304688, -385.193359375, 67.75414276123},{2033.0139160156, -387.97644042969, 68.030769348145},{2027, -393.62493896484, 68.582916259766},{2024.1010742188, -396.61904907227, 68.852142333984},{2023.5988769531, -397.23559570313, 68.889785766602},{2018.4202880859, -403.72973632813, 69.265274047852},{2015.6887207031, -407.94482421875, 69.399223327637},{2011.0765380859, -415.85180664063, 69.644325256348},{2008.7982177734, -420.29351806641, 69.773948669434},{2005.3098144531, -427.86947631836, 69.95873260498},{2004.9910888672, -428.65887451172, 69.973915100098},{2003.4516601563, -432.51910400391, 70.047966003418},{2003.1772460938, -433.32525634766, 70.062965393066},{2000.5255126953, -441.20697021484, 70.209373474121},{2000.2956542969, -442.02990722656, 70.22420501709},{1998.9672851563, -446.87298583984, 70.322830200195},{1996.7380371094, -455.75665283203, 70.601753234863},{1996.1965332031, -458.19171142578, 70.702125549316},{1996.0509033203, -459.02545166016, 70.733848571777},{1994.6501464844, -467.22030639648, 71.04369354248},{1994.5546875, -468.01123046875, 71.07096862793},{1993.9868164063, -472.95745849609, 71.243171691895},{1993.3413085938, -482.09451293945, 71.583976745605},{1993.27734375, -485.38766479492, 71.718231201172},{1993.3126220703, -486.24169921875, 71.758918762207},{1993.7097167969, -494.63665771484, 72.164619445801},{1994.2038574219, -498.82705688477, 72.388618469238},{1994.3465576172, -499.6672668457, 72.420112609863},{1995.7778320313, -507.85522460938, 72.714530944824},{1996.9309082031, -512.66845703125, 72.80411529541},{1999.5610351563, -521.40576171875, 72.972923278809},{2001.0129394531, -525.27606201172, 73.039009094238},{2001.365234375, -526.04644775391, 73.039894104004},{2004.8725585938, -533.54235839844, 73.033409118652},{2007.7685546875, -538.65057373047, 72.933128356934},{2012.5595703125, -546.49072265625, 72.738914489746},{2015.8116455078, -551.38684082031, 72.587104797363},{2020.8366699219, -558.05926513672, 72.308265686035},{2021.3588867188, -558.66485595703, 72.274932861328},{2027.3961181641, -565.60021972656, 71.887077331543},{2033.6865234375, -572.22937011719, 71.460136413574},{2039.6697998047, -578.04528808594, 71.016639709473},{2045.7552490234, -583.66082763672, 70.434196472168},{2067.0234375, -602.35754394531, 67.956443786621},{2073.955078125, -608.30773925781, 66.975135803223},{2099.5915527344, -629.59826660156, 62.824783325195},{2126.283203125, -650.81848144531, 57.975578308105},{2140.2170410156, -661.57757568359, 55.354537963867},{2153.44921875, -671.6494140625, 52.816360473633},{2172.1447753906, -685.708984375, 49.638565063477},{2176.1245117188, -688.7314453125, 48.89185333252},{2182.7805175781, -693.78790283203, 47.801376342773},{2208.1635742188, -712.75286865234, 44.295600891113},{2215.140625, -718.61822509766, 43.288719177246},{2237.0786132813, -738.87451171875, 40.177360534668},{2237.5708007813, -739.43817138672, 40.101722717285},{2243.0490722656, -745.78112792969, 39.254417419434},{2243.5363769531, -746.48315429688, 39.168586730957},{2257.818359375, -767.15313720703, 36.649116516113},{2258.2006835938, -767.85009765625, 36.575393676758},{2262.1215820313, -775.15893554688, 35.812400817871},{2271.0515136719, -796.56677246094, 33.866432189941},{2271.2927246094, -797.32470703125, 33.800621032715},{2273.7905273438, -805.24353027344, 33.113945007324},{2273.9777832031, -806.07507324219, 33.044933319092},{2278.923828125, -828.08605957031, 31.220708847046},{2279.0546875, -828.87524414063, 31.165271759033},{2280.3937988281, -837.06701660156, 30.594404220581},{2280.490234375, -837.96258544922, 30.542737960815},{2282.9604492188, -861.14825439453, 29.203855514526},{2283.6284179688, -870.32836914063, 28.659225463867},{2284.6796875, -893.63061523438, 27.258623123169},{2284.6987304688, -894.48071289063, 27.234632492065},{2284.875, -902.83178710938, 27.018484115601},{2284.875, -1028.0334472656, 27.497308731079},{2284.875, -1157.9750976563, 27.126161575317},{2284.875, -1166.7934570313, 26.933259963989},{2284.875, -1193.5090332031, 25.865991592407},{2284.875, -1214.0588378906, 24.836107254028},{2284.875, -1223.2600097656, 24.622308731079},{2284.8681640625, -1368.2766113281, 24.615560531616},{2284.828125, -1375.7775878906, 24.559808731079},{2284.8442382813, -1379.9279785156, 24.529016494751},{2284.8305664063, -1384.9289550781, 24.49730682373},{2284.875, -1389.9294433594, 24.497308731079},{2284.8603515625, -1392.435546875, 24.497308731079},{2284.6967773438, -1401.6550292969, 24.497308731079},{2284.4638671875, -1408.4877929688, 24.492839813232},{2284.0146484375, -1417.6403808594, 24.452266693115},{2283.5744628906, -1424.2841796875, 24.396808624268},{2282.716796875, -1433.4046630859, 24.284536361694},{2281.919921875, -1439.9516601563, 24.177696228027},{2280.6108398438, -1448.9594726563, 23.995296478271},{2279.4958496094, -1455.552734375, 23.837781906128},{2277.7329101563, -1464.5144042969, 23.615528106689},{2276.4477539063, -1470.2263183594, 23.469263076782},{2275.06640625, -1475.9107666016, 23.308912277222},{2274.3271484375, -1479.1241455078, 23.188520431519},{2273.9052734375, -1480.7563476563, 23.154260635376},{2273.0512695313, -1484.08203125, 23.103689193726},{2272.654296875, -1485.6469726563, 23.052490234375},{2271.8208007813, -1488.8024902344, 22.945514678955},{2271.3671875, -1490.4008789063, 22.915632247925},{2270.4001464844, -1493.6323242188, 22.822965621948},{2270.1435546875, -1494.4291992188, 22.790866851807},{2268.6123046875, -1499.1171875, 22.588026046753},{2267.51953125, -1502.2087402344, 22.418741226196},{2264.3127441406, -1510.8134765625, 21.961999893188},{2261.8510742188, -1517.0102539063, 21.633193969727},{2258.6540527344, -1524.7288818359, 21.166360855103},{2257.3588867188, -1527.7609863281, 20.980535507202},{2253.826171875, -1536.2619628906, 20.605546951294},{2248.2006835938, -1550.1625976563, 20.11615562439},{2224.0366210938, -1608.7023925781, 17.030323028564},{2221.3488769531, -1614.9610595703, 16.765163421631},{2218.0444335938, -1623.5427246094, 16.423336029053},{2215.3562011719, -1631.4077148438, 16.133638381958},{2212.7600097656, -1640.1072998047, 15.883564949036},{2210.3984375, -1648.9393310547, 15.681569099426},{2205.3452148438, -1667.5516357422, 15.109558105469},{2205.1684570313, -1668.3354492188, 15.088371276855},{2203.3408203125, -1676.5168457031, 14.867435455322},{2203.1850585938, -1677.3544921875, 14.845193862915},{2202.294921875, -1682.2766113281, 14.713080406189},{2200.8940429688, -1691.2331542969, 14.45984172821},{2199.9323730469, -1698.5419921875, 14.245477676392},{2199.8588867188, -1699.3880615234, 14.2270860672},{2199.1606445313, -1707.6596679688, 14.050893783569},{2199.1240234375, -1708.5241699219, 14.038633346558},{2198.77734375, -1717.0041503906, 13.92755317688},{2198.5556640625, -1725.3698730469, 13.872308731079},{2198.5, -1732.0705566406, 13.872308731079},{2198.5166015625, -1735.3708496094, 13.872308731079},{2198.5625, -1741.2214355469, 13.872308731079},{2198.5727539063, -1743.7219238281, 13.872308731079},{2198.625, -1749.5720214844, 13.872308731079},{2198.6384277344, -1902.673828125, 14.247308731079},{2198.2385253906, -1909.3195800781, 14.247308731079},{2198.1457519531, -1910.1193847656, 14.247308731079},{2198.0341796875, -1910.9678955078, 14.247308731079},{2197.875, -1911.8104248047, 14.247308731079},{2197.23828125, -1915.0659179688, 14.247308731079},{2197.0256347656, -1915.8627929688, 14.247308731079},{2196.3581542969, -1918.2131347656, 14.247308731079},{2195.0119628906, -1922.1423339844, 14.247308731079},{2194.3413085938, -1923.7255859375, 14.247308731079},{2193.9912109375, -1924.44140625, 14.247308731079},{2192.4877929688, -1927.4089355469, 14.247308731079},{2192.0651855469, -1928.1311035156, 14.247308731079},{2190.7583007813, -1930.2570800781, 14.247308731079},{2188.8896484375, -1933.0297851563, 14.247308731079},{2187.3518066406, -1934.9761962891, 14.247308731079},{2184.5478515625, -1938.0928955078, 14.247308731079},{2182.7443847656, -1939.8460693359, 14.247308731079},{2178.9995117188, -1943.1042480469, 14.247308731079},{2178.3654785156, -1943.5690917969, 14.247308731079},{2177.6650390625, -1944.0490722656, 14.247308731079},{2174.2329101563, -1946.3779296875, 14.247308731079},{2173.4948730469, -1946.8156738281, 14.247308731079},{2171.298828125, -1948.0305175781, 14.247308731079},{2168.3051757813, -1949.494140625, 14.247308731079},{2167.5864257813, -1949.7943115234, 14.247308731079},{2166.0358886719, -1950.4052734375, 14.247308731079},{2165.2822265625, -1950.6652832031, 14.247308731079},{2162.1096191406, -1951.7145996094, 14.247308731079},{2161.2885742188, -1951.9377441406, 14.247308731079},{2159.6923828125, -1952.3353271484, 14.247308731079},{2158.8671875, -1952.5001220703, 14.247308731079},{2155.6557617188, -1953.0989990234, 14.247308731079},{2154.8190917969, -1953.2080078125, 14.247308731079},{2153.1762695313, -1953.3674316406, 14.247308731079},{2146.486328125, -1953.75, 14.247308731079},{1872.5747070313, -1953.7685546875, 14.210021018982},{1494.1519775391, -1953.75, 13.997308731079},{1487.5394287109, -1953.763671875, 13.997308731079},{1478.2746582031, -1953.8784179688, 13.997308731079},{1475.7416992188, -1953.91796875, 13.997308731079},{1466.5227050781, -1954, 13.997308731079},{1464.0227050781, -1953.9899902344, 13.997308731079},{1454.8718261719, -1953.8826904297, 13.997308731079},{1452.4262695313, -1953.826171875, 13.988830566406},{1443.2604980469, -1953.5339355469, 13.835263252258},{1440.0080566406, -1953.3843994141, 13.734914779663},{1430.8591308594, -1952.8044433594, 13.455163955688},{1427.5462646484, -1952.509765625, 13.34588432312},{1419.1530761719, -1951.5847167969, 13.009714126587},{1418.2973632813, -1951.4672851563, 12.967767715454},{1414.9912109375, -1950.9958496094, 12.794939041138},{1405.9388427734, -1949.5202636719, 12.209794998169},{1401.9260253906, -1948.7535400391, 11.884678840637},{1393.0231933594, -1946.7746582031, 11.022100448608},{1388.9172363281, -1945.7232666016, 10.564426422119},{1380.0561523438, -1943.1770019531, 9.6279315948486},{1375.2625732422, -1941.6437988281, 9.1418447494507},{1374.4562988281, -1941.3649902344, 9.0421648025513},{1366.6359863281, -1938.6497802734, 8.065242767334},{1360.3679199219, -1936.2770996094, 7.1281986236572},{1351.9184570313, -1932.7316894531, 5.7402067184448},{1345.2126464844, -1929.60546875, 4.5545988082886},{1337.8234863281, -1925.7272949219, 3.3063662052155},{1337.1499023438, -1925.294921875, 3.2023861408234},{1330.1735839844, -1920.7844238281, 2.1294555664063},{1328.7998046875, -1919.7661132813, 1.9417335987091},{1321.5393066406, -1914.1174316406, 1.0285791158676},{1312.7174072266, -1906.4880371094, 0.10160434246063},{1309.6508789063, -1903.7138671875, -0.20318388938904},{1302.9642333984, -1897.3854980469, -0.77969360351563},{1292.9926757813, -1887.3294677734, -1.4973893165588},{1287.8256835938, -1881.9008789063, -1.8346037864685},{1282.1822509766, -1875.8614501953, -2.0828666687012},{1259.7551269531, -1851.1416015625, -2.6073684692383},{1200.1687011719, -1782.6806640625, -3.7281169891357},{1033.7326660156, -1590.7719726563, -2.7821307182312},{975.39154052734, -1526.5751953125, -1.9165644645691},{916.28356933594, -1464.3911132813, -1.287620306015},{884.99169921875, -1433.0068359375, -1.1363220214844},{847.84228515625, -1396.9963378906, -1.0337052345276},{816.11645507813, -1367.580078125, -1.1192872524261},{780.69921875, -1335.919921875, -1.0026912689209},{777.72576904297, -1333.1586914063, -0.99425196647644},{773.99243164063, -1329.8549804688, -0.9573802947998},{771.5009765625, -1327.5986328125, -0.92798709869385},{732.68005371094, -1294.783203125, -0.17435824871063},{687.24255371094, -1258.2313232422, 1.2675226926804},{679.962890625, -1252.6135253906, 1.5342231988907},{639.91918945313, -1222.7668457031, 3.143529176712},{632.38934326172, -1217.3908691406, 3.4763453006744},{591.90515136719, -1189.4504394531, 5.3884444236755},{584.95776367188, -1184.8774414063, 5.7425212860107},{543.98284912109, -1158.9887695313, 7.9541983604431},{536.07556152344, -1154.28515625, 8.376823425293},{494.11209106445, -1130.5866699219, 10.601245880127},{486.74163818359, -1126.6833496094, 10.985790252686},{443.42242431641, -1105.0546875, 13.215034484863},{435.17315673828, -1101.2312011719, 13.635534286499},{391.67581176758, -1082.2924804688, 15.832745552063},{383.18511962891, -1078.9240722656, 16.222410202026},{338.64154052734, -1062.6072998047, 18.106332778931},{329.90087890625, -1059.7517089844, 18.448656082153},{284.26211547852, -1046.2541503906, 20.120985031128},{276.26556396484, -1044.1778564453, 20.36407661438},{275.43411254883, -1043.9895019531, 20.38458442688},{228.97012329102, -1033.4909667969, 21.527456283569},{219.98663330078, -1031.8073730469, 21.702930450439},{171.46853637695, -1024.3083496094, 22.439002990723},{163.28057861328, -1023.3471679688, 22.507638931274},{162.43109130859, -1023.276550293, 22.509450912476},{113.31829833984, -1019.2135009766, 22.609331130981},{104.13505554199, -1018.7731323242, 22.554399490356},{53.29712677002, -1018.0515136719, 21.912651062012},{44.176979064941, -1018, 21.702425003052},{40.978370666504, -1018, 21.612829208374},{31.771234512329, -1018, 21.433706283569},{20.088115692139, -1018, 21.372308731079},{5.7991609573364, -1017.9935302734, 21.365793228149},{-3.3525195121765, -1017.9364013672, 21.308694839478},{-5.8302321434021, -1017.9229736328, 21.275213241577},{-14.05717754364, -1017.9288330078, 21.139709472656},{-29.148355484009, -1018.0771484375, 20.80645942688},{-37.43384552002, -1018.0725097656, 20.537359237671},{-49.023422241211, -1018, 19.993402481079},{-52.402328491211, -1018, 19.799428939819},{-61.674087524414, -1018, 19.144491195679},{-72.534408569336, -1018, 18.126626968384},{-75.820266723633, -1018, 17.767276763916},{-84.865585327148, -1018, 16.639753341675},{-87.35888671875, -1018.0116577148, 16.294010162354},{-96.508255004883, -1018.2137451172, 15.06330871582},{-102.37516784668, -1018.461730957, 14.306268692017},{-103.22869110107, -1018.5299072266, 14.216913223267},{-111.56387329102, -1019.2129516602, 13.355335235596},{-112.41847229004, -1019.3146972656, 13.287509918213},{-118.29295349121, -1020.0285644531, 12.827926635742},{-119.08367156982, -1020.1498413086, 12.777656555176},{-127.32946777344, -1021.4362792969, 12.263239860535},{-134.62295532227, -1022.8367919922, 11.933046340942},{-143.5556640625, -1024.8264160156, 11.705858230591},{-150.88909912109, -1026.6926269531, 11.664480209351},{-158.95045471191, -1028.98046875, 11.73334312439},{-159.76019287109, -1029.2355957031, 11.752470016479},{-166.88844299316, -1031.5187988281, 11.929483413696},{-174.66375732422, -1034.2712402344, 12.181811332703},{-175.4479675293, -1034.5772705078, 12.213689804077},{-182.36291503906, -1037.3110351563, 12.512746810913},{-190.02947998047, -1040.5905761719, 12.970729827881},{-190.76054382324, -1040.9279785156, 13.026966094971},{-196.86880493164, -1043.7854003906, 13.502574920654},{-205.04623413086, -1047.9790039063, 14.194694519043},{-210.85879516602, -1051.2392578125, 14.735012054443},{-217.98486328125, -1055.4940185547, 15.480821609497},{-223.50442504883, -1059.0563964844, 16.134838104248},{-231.05307006836, -1064.4931640625, 17.087718963623},{-234.98425292969, -1067.6557617188, 17.627923965454},{-241.82745361328, -1073.7248535156, 18.715934753418},{-244.72863769531, -1076.6048583984, 19.248456954956},{-250.82824707031, -1083.4908447266, 20.445165634155},{-252.87391662598, -1086.1364746094, 20.878709793091},{-258.26995849609, -1093.5471191406, 22.07336807251},{-284.45379638672, -1131.0043945313, 28.192676544189},{-310.56756591797, -1166.7485351563, 33.880378723145},{-327.7666015625, -1189.3234863281, 37.165084838867},{-343.06356811523, -1209.0014648438, 39.609672546387},{-348.83529663086, -1216.1606445313, 40.347518920898},{-349.91168212891, -1217.4406738281, 40.461380004883},{-350.48385620117, -1218.0778808594, 40.516975402832},{-356.08868408203, -1224.2756347656, 41.056678771973},{-357.31509399414, -1225.4343261719, 41.145896911621},{-363.43975830078, -1230.8697509766, 41.52604675293},{-364.09555053711, -1231.3798828125, 41.553375244141},{-366.03213500977, -1232.8192138672, 41.631729125977},{-373.66482543945, -1237.9840087891, 41.922836303711},{-375.85699462891, -1239.2795410156, 41.994438171387},{-383.94116210938, -1243.5971679688, 42.171684265137},{-387.65231323242, -1245.3237304688, 42.213226318359},{-396.07864379883, -1248.765625, 42.345397949219},{-400.10913085938, -1250.1713867188, 42.41919708252},{-400.87548828125, -1250.4050292969, 42.426689147949},{-408.83508300781, -1252.7952880859, 42.49730682373},{-412.90780639648, -1253.8188476563, 42.49845123291},{-413.73684692383, -1253.984375, 42.502250671387},{-421.83590698242, -1255.5783691406, 42.54126739502},{-422.67034912109, -1255.6997070313, 42.548858642578},{-426.74768066406, -1256.2729492188, 42.584106445313},{-427.58837890625, -1256.3530273438, 42.587898254395},{-435.80377197266, -1257.1068115234, 42.62230682373},{-436.70138549805, -1257.1479492188, 42.62230682373},{-440.79016113281, -1257.2780761719, 42.618179321289},{-449.13897705078, -1257.0993652344, 42.577789306641},{-449.99127197266, -1257.0275878906, 42.569816589355},{-454.1360168457, -1256.6147460938, 42.535118103027},{-462.34719848633, -1255.3037109375, 42.49730682373},{-463.11953735352, -1255.1237792969, 42.49730682373},{-467.16619873047, -1254.1065673828, 42.49730682373},{-475.14801025391, -1251.5374755859, 42.49730682373},{-475.90570068359, -1251.2297363281, 42.49730682373},{-479.03729248047, -1249.8845214844, 42.49730682373},{-486.47601318359, -1246.0212402344, 42.49730682373},{-487.18676757813, -1245.5637207031, 42.49730682373},{-490.59692382813, -1243.3208007813, 42.49730682373},{-497.46362304688, -1238.4897460938, 42.49730682373},{-500.10211181641, -1236.4818115234, 42.49730682373},{-547.3427734375, -1199.9411621094, 42.49730682373},{-562.30206298828, -1187.8940429688, 42.49730682373},{-591.33715820313, -1163.8901367188, 42.506950378418},{-598.51477050781, -1158.1296386719, 42.606536865234},{-606.40881347656, -1152.048828125, 42.806938171387},{-607.10345458984, -1151.5595703125, 42.838638305664},{-613.90905761719, -1146.8060302734, 43.161422729492},{-621.71691894531, -1141.8618164063, 43.687484741211},{-629.65887451172, -1137.3374023438, 44.371520996094},{-636.3076171875, -1133.9461669922, 45.058952331543},{-644.56823730469, -1130.22265625, 46.033386230469},{-650.74420166016, -1127.8190917969, 46.854232788086},{-658.61352539063, -1125.2307128906, 48.008857727051},{-659.443359375, -1125.0085449219, 48.142219543457},{-664.32348632813, -1123.7510986328, 48.932113647461},{-672.46069335938, -1122.0769042969, 50.296646118164},{-673.23913574219, -1121.9626464844, 50.432327270508},{-677.32922363281, -1121.3745117188, 51.145767211914},{-678.12603759766, -1121.3098144531, 51.286666870117},{-686.44982910156, -1120.6566162109, 52.759544372559},{-687.31579589844, -1120.6402587891, 52.914756774902},{-690.67260742188, -1120.60546875, 53.518600463867},{-691.52905273438, -1120.6391601563, 53.675857543945},{-699.93432617188, -1121.0134277344, 55.222579956055},{-703.21783447266, -1121.357421875, 55.838043212891},{-704.05206298828, -1121.4915771484, 55.988960266113},{-712.23962402344, -1122.8420410156, 57.466178894043},{-713.01318359375, -1123.015625, 57.600357055664},{-716.24438476563, -1123.7958984375, 58.149299621582},{-724.25372314453, -1126.0756835938, 59.43669128418},{-725.01574707031, -1126.3352050781, 59.550186157227},{-727.38891601563, -1127.1625976563, 59.898628234863},{-728.1767578125, -1127.4854736328, 60.001953125},{-735.90338134766, -1130.6878662109, 61.00611114502},{-736.62475585938, -1131.0363769531, 61.087173461914},{-738.86651611328, -1132.1412353516, 61.33065032959},{-739.61022949219, -1132.5400390625, 61.398857116699},{-746.89782714844, -1136.4829101563, 62.054130554199},{-749.697265625, -1138.1528320313, 62.247062683105},{-750.41735839844, -1138.6079101563, 62.290420532227},{-757.49108886719, -1143.0952148438, 62.712051391602},{-759.59790039063, -1144.5187988281, 62.819351196289},{-767.08715820313, -1149.8466796875, 63.217430114746},{-769.06518554688, -1151.3469238281, 63.332275390625},{-776.22546386719, -1156.9798583984, 63.807945251465},{-777.51104736328, -1158.07421875, 63.907508850098},{-784.22833251953, -1164.0998535156, 64.443420410156},{-785.36889648438, -1165.2717285156, 64.553680419922},{-791.06140136719, -1171.4125976563, 65.168144226074},{-791.61730957031, -1172.0838623047, 65.242111206055},{-792.10717773438, -1172.7268066406, 65.309906005859},{-797.68188476563, -1180.1401367188, 66.086326599121},{-798.11987304688, -1180.8046875, 66.155738830566},{-798.53442382813, -1181.4855957031, 66.23265838623},{-802.86560058594, -1188.6511230469, 67.047454833984},{-803.24487304688, -1189.3568115234, 67.13565826416},{-804.01977539063, -1190.8649902344, 67.319496154785},{-807.86328125, -1199.0637207031, 68.270530700684},{-809.10668945313, -1202.1149902344, 68.605796813965},{-809.38464355469, -1202.8583984375, 68.692817687988},{-812.26782226563, -1210.6313476563, 69.607482910156},{-813.8359375, -1215.39453125, 70.199501037598},{-816.41760253906, -1224.1917724609, 71.262519836426},{-817.87902832031, -1229.8666992188, 71.931785583496},{-819.91912841797, -1238.7711181641, 73.006248474121},{-821.7109375, -1247.7109375, 74.102783203125},{-823.35766601563, -1256.7707519531, 75.177589416504},{-826.2578125, -1274.9420166016, 77.297554016113},{-827.96484375, -1287.2873535156, 78.786842346191},{-834.54431152344, -1336.8529052734, 84.868934631348},{-838.93395996094, -1366.5158691406, 88.257774353027},{-840.33984375, -1374.6774902344, 89.173637390137},{-842.10485839844, -1383.6450195313, 90.176696777344},{-844.07995605469, -1392.5909423828, 91.170021057129},{-846.07928466797, -1400.7689208984, 92.067817687988},{-848.48852539063, -1409.5998535156, 92.96736907959},{-850.64709472656, -1416.7380371094, 93.639404296875},{-853.65856933594, -1425.3957519531, 94.412208557129},{-856.14538574219, -1431.6794433594, 94.941383361816},{-859.91094970703, -1439.9841308594, 95.597984313965},{-862.55651855469, -1445.1247558594, 95.973731994629},{-862.96594238281, -1445.8115234375, 96.013763427734},{-867.27471923828, -1452.9677734375, 96.423042297363},{-867.763671875, -1453.6789550781, 96.452674865723},{-870.68981933594, -1457.8093261719, 96.618034362793},{-875.88098144531, -1464.3020019531, 96.831878662109},{-876.45153808594, -1464.9243164063, 96.846702575684},{-879.85925292969, -1468.5269775391, 96.915489196777},{-885.98791503906, -1474.0432128906, 96.874076843262},{-886.62268066406, -1474.517578125, 96.853157043457},{-890.62237548828, -1477.4379882813, 96.711433410645},{-897.67114257813, -1481.8308105469, 96.352569580078},{-898.43139648438, -1482.2219238281, 96.301879882813},{-902.90893554688, -1484.5085449219, 95.999702453613},{-903.646484375, -1484.8170166016, 95.934371948242},{-911.35443115234, -1488.0090332031, 95.244300842285},{-912.1611328125, -1488.2734375, 95.156181335449},{-917.67199707031, -1490.0621337891, 94.551025390625},{-918.49267578125, -1490.2834472656, 94.452796936035},{-926.56457519531, -1492.4309082031, 93.481292724609},{-927.35046386719, -1492.5988769531, 93.379318237305},{-934.71466064453, -1494.13671875, 92.412979125977},{-942.90057373047, -1495.6048583984, 91.267425537109},{-951.86596679688, -1496.9206542969, 89.925804138184},{-961.02209472656, -1497.9741210938, 88.460639953613},{-979.38781738281, -1499.4624023438, 85.302696228027},{-1009.3190307617, -1501.2700195313, 79.763023376465},{-1019.3096923828, -1501.8663330078, 77.751762390137},{-1038.4234619141, -1503.1647949219, 73.710601806641},{-1050.0190429688, -1504.1782226563, 71.199363708496},{-1059.0974121094, -1505.1486816406, 69.139694213867},{-1070.6662597656, -1506.6176757813, 66.40754699707},{-1078.82421875, -1507.8798828125, 64.469314575195},{-1090.2607421875, -1509.9685058594, 61.727447509766},{-1109.150390625, -1513.5010986328, 56.883010864258},{-1118.23046875, -1514.8952636719, 54.581695556641},{-1129.0295410156, -1516.1954345703, 51.920997619629},{-1137.3403320313, -1516.9885253906, 49.899299621582},{-1147.2943115234, -1517.6904296875, 47.510429382324},{-1148.0932617188, -1517.7189941406, 47.326850891113},{-1156.4323730469, -1518, 45.415382385254},{-1157.2836914063, -1518, 45.228622436523},{-1176.4443359375, -1517.9289550781, 41.076667785645},{-1187.2687988281, -1517.7719726563, 38.819427490234},{-1196.4072265625, -1517.4915771484, 37.051628112793},{-1215.5098876953, -1516.5389404297, 33.70304107666},{-1227.9145507813, -1515.7082519531, 31.755842208862},{-1237.1123046875, -1515.1021728516, 30.451620101929},{-1248.8234863281, -1514.3269042969, 28.94624710083},{-1257.9837646484, -1513.6169433594, 27.921594619751},{-1270.4558105469, -1512.5509033203, 26.714834213257},{-1278.7878417969, -1511.9438476563, 26.038314819336},{-1292.1081542969, -1511.1385498047, 25.158071517944},{-1292.90234375, -1511.1068115234, 25.116611480713},{-1301.1870117188, -1510.7836914063, 24.689569473267},{-1302.0261230469, -1510.7677001953, 24.657709121704},{-1312.6971435547, -1510.5633544922, 24.271575927734},{-1321.8828125, -1510.3708496094, 24.122308731079},{-1364.4914550781, -1509.5500488281, 24.003799438477},{-1388.4919433594, -1509.1788330078, 23.569723129272},{-1414.2906494141, -1508.6823730469, 22.945598602295},{-1439.2902832031, -1507.9932861328, 22.137769699097},{-1448.4953613281, -1507.6146240234, 21.784242630005},{-1466.8161621094, -1506.6496582031, 21.006414413452},{-1492.6281738281, -1504.9963378906, 20.016437530518},{-1501.7956542969, -1504.2573242188, 19.650629043579},{-1519.9528808594, -1502.5534667969, 18.890455245972},{-1529.0854492188, -1501.5562744141, 18.50715637207},{-1546.4631347656, -1499.4298095703, 17.777978897095},{-1555.4790039063, -1498.1413574219, 17.420269012451},{-1573.4387207031, -1495.2329101563, 16.74501991272},{-1581.6591796875, -1493.7092285156, 16.45288848877},{-1598.974609375, -1490.1098632813, 15.871829032898},{-1607.8725585938, -1488.0183105469, 15.593721389771},{-1624.681640625, -1483.6475830078, 15.104999542236},{-1633.4404296875, -1481.0551757813, 14.891380310059},{-1649.3186035156, -1475.8403320313, 14.573617935181},{-1657.9587402344, -1472.6719970703, 14.469602584839},{-1672.5539550781, -1466.8211669922, 14.393165588379},{-1680.9490966797, -1462.9099121094, 14.372308731079},{-1695.7615966797, -1455.0961914063, 14.372308731079},{-1703.6228027344, -1450.3764648438, 14.372308731079},{-1718.1890869141, -1440.6455078125, 14.372308731079},{-1718.8709716797, -1440.14453125, 14.372308731079},{-1725.5510253906, -1435.203125, 14.372308731079},{-1740.9636230469, -1422.7130126953, 14.372308731079},{-1747.82421875, -1416.7336425781, 14.372308731079},{-1762.4675292969, -1403.1669921875, 14.372308731079},{-1768.9506835938, -1396.7470703125, 14.372308731079},{-1784.0450439453, -1380.8758544922, 14.372308731079},{-1789.6042480469, -1374.73046875, 14.372308731079},{-1804.1586914063, -1357.8762207031, 14.372308731079},{-1810.0234375, -1350.7646484375, 14.372308731079},{-1828.0675048828, -1327.8486328125, 14.372308731079},{-1841.4440917969, -1309.6875, 14.372308731079},{-1858.2277832031, -1285.6984863281, 14.372308731079},{-1874.2673339844, -1261.5692138672, 14.372308731079},{-1879.6359863281, -1253.1459960938, 14.372308731079},{-1902.28515625, -1215.9827880859, 14.372308731079},{-1914.3486328125, -1195.1812744141, 14.377604484558},{-1924.7915039063, -1176.1136474609, 14.587295532227},{-1929.0051269531, -1167.9565429688, 14.755911827087},{-1934.2076416016, -1157.4437255859, 15.041654586792},{-1938.0522460938, -1149.2097167969, 15.353223800659},{-1942.6842041016, -1138.6955566406, 15.849766731262},{-1946.1655273438, -1130.1877441406, 16.278755187988},{-1950.0620117188, -1119.9990234375, 16.824201583862},{-1953.2019042969, -1111.3200683594, 17.348627090454},{-1956.6884765625, -1101.1220703125, 18.026235580444},{-1959.4055175781, -1092.3933105469, 18.629932403564},{-1962.3642578125, -1081.9504394531, 19.375074386597},{-1964.6049804688, -1073.1016845703, 19.998136520386},{-1966.9849853516, -1062.6104736328, 20.726602554321},{-1968.8317871094, -1053.583984375, 21.316204071045},{-1970.9311523438, -1042.1630859375, 22.02038192749},{-1972.3895263672, -1033.1484375, 22.565855026245},{-1974.0540771484, -1021.4020996094, 23.262546539307},{-1975.1245117188, -1012.2999267578, 23.761722564697},{-1976.3776855469, -999.12329101563, 24.425512313843},{-1977.078125, -989.94403076172, 24.801351547241},{-1977.8779296875, -976.55053710938, 25.240852355957},{-1978.2595214844, -967.40563964844, 25.506830215454},{-1978.640625, -952.46221923828, 25.888025283813},{-1978.6529541016, -951.66442871094, 25.900245666504},{-1978.7744140625, -943.38708496094, 26.021640777588},{-1978.8520507813, -926.71752929688, 26.101720809937},{-1979.7194824219, -620.05078125, 26.129453659058},{-1980.0407714844, -589.2119140625, 26.363851547241},{-1980.0317382813, -585.9130859375, 26.372308731079},{-1980.0539550781, -583.4140625, 26.372308731079},{-1980.0932617188, -580.9150390625, 26.372308731079},{-1980.0838623047, -577.56640625, 26.353286743164},{-1980.0671386719, -575.0673828125, 26.301223754883},{-1980.0987548828, -571.767578125, 26.247308731079},{-1980.1091308594, -568.4189453125, 26.224359512329},{-1980.0825195313, -562.5712890625, 26.122308731079},{-1979.8896484375, -523.435546875, 26.122308731079},{-1979.6949462891, -514.2392578125, 26.122308731079},{-1979.4699707031, -507.591796875, 26.122308731079},{-1978.984375, -498.4453125, 26.122308731079},{-1977.2454833984, -475.30630493164, 26.122308731079},{-1975.8256835938, -460.44140625, 26.122308731079},{-1974.7241210938, -450.4453125, 26.122308731079},{-1970.3959960938, -411.56072998047, 26.122308731079},{-1968.0404052734, -386.65234375, 26.122308731079},{-1967.3486328125, -378.3056640625, 26.122308731079},{-1966.7474365234, -369.958984375, 26.122308731079},{-1964.8063964844, -338.3212890625, 26.122308731079},{-1964.2752685547, -331.68109130859, 26.122308731079},{-1963.4080810547, -322.58822631836, 26.122308731079},{-1962.5852050781, -315.23114013672, 26.122308731079},{-1961.4291992188, -306.1640625, 26.122308731079},{-1956.8215332031, -274.8583984375, 26.122308731079},{-1951.8380126953, -242.7041015625, 26.122308731079},{-1949.9488525391, -226.96130371094, 26.122308731079},{-1948.2387695313, -210.5458984375, 26.122308731079},{-1946.2265625, -188.052734375, 26.122308731079},{-1945.3376464844, -176.35546875, 26.122308731079},{-1945.0124511719, -171.3564453125, 26.122308731079},{-1944.6342773438, -163.0595703125, 26.122308731079},{-1944.4786376953, -156.3623046875, 26.122308731079},{-1944.375, -147.21484375, 26.122308731079},{-1944.2497558594, 129.216796875, 26.122308731079},{-1943.6265869141, 151.7080078125, 26.122308731079},{-1943.2249755859, 160.904296875, 26.122308731079},{-1942.2705078125, 177.50354003906, 26.122308731079},{-1941.8391113281, 184.12586975098, 26.122308731079},{-1941.1281738281, 192.50590515137, 26.100900650024},{-1941.0382080078, 193.37631225586, 26.097581863403},{-1939.9486083984, 203.37725830078, 26.02162361145},{-1939.8471679688, 204.16622924805, 25.995428085327},{-1938.7719726563, 212.3984375, 25.713609695435},{-1938.6408691406, 213.23321533203, 25.669189453125},{-1936.2353515625, 227.97489929199, 24.914493560791},{-1934.4588623047, 236.9035949707, 24.295900344849},{-1932.6027832031, 244.99401855469, 23.581609725952},{-1932.3852539063, 245.76824951172, 23.504333496094},{-1930.0783691406, 253.84710693359, 22.690090179443},{-1928.1528320313, 259.48413085938, 22.051202774048},{-1927.8504638672, 260.23059082031, 21.955396652222},{-1924.6594238281, 267.99868774414, 20.94801902771},{-1922.8306884766, 271.70745849609, 20.402982711792},{-1922.3857421875, 272.42352294922, 20.290336608887},{-1917.9532470703, 279.4201965332, 19.182786941528},{-1917.4604492188, 280.04864501953, 19.07567024231},{-1914.8551025391, 283.3303527832, 18.512380599976},{-1908.9174804688, 290.24810791016, 17.271104812622},{-1905.4992675781, 293.87298583984, 16.581481933594},{-1899.5690917969, 299.72131347656, 15.405239105225},{-1896.4799804688, 302.48333740234, 14.808729171753},{-1889.4152832031, 308.13934326172, 13.519704818726},{-1886.0217285156, 310.52331542969, 12.933397293091},{-1879.1259765625, 315.14016723633, 11.743173599243},{-1863.7626953125, 325.13146972656, 9.0735511779785},{-1825.0364990234, 350.94891357422, 2.3236222267151},{-1817.3330078125, 356.15380859375, 1.4949089288712},{-1811.7729492188, 359.97003173828, 1.1970000267029},{-1804.2844238281, 365.15524291992, 1.0382578372955},{-1791.3831787109, 374.18829345703, 1.274377822876},{-1785.1916503906, 378.55187988281, 1.5207195281982},{-1772.1976318359, 387.71441650391, 2.2984180450439},{-1759.3349609375, 396.93658447266, 3.3529987335205},{-1751.9012451172, 402.32562255859, 4.1554126739502},{-1725.6340332031, 421.40594482422, 7.6695346832275},{-1712.8815917969, 430.74041748047, 9.6500034332275},{-1596.8483886719, 514.95227050781, 29.918912887573},{-1577.9750976563, 528.62854003906, 32.545341491699},{-1570.5793457031, 533.98779296875, 33.308586120605},{-1551.7443847656, 547.63696289063, 34.643684387207},{-1544.9771728516, 552.54541015625, 34.891647338867},{-1518.603515625, 571.69738769531, 34.99730682373},{-775.33203125, 1111.7420654297, 34.038459777832},{-763.07165527344, 1120.578125, 33.597747802734},{-750.74890136719, 1129.0783691406, 33.018951416016},{-736.81164550781, 1138.2608642578, 32.375885009766},{-723.31408691406, 1146.5844726563, 31.777307510376},{-715.40686035156, 1151.1110839844, 31.389120101929},{-704.49084472656, 1157.0300292969, 30.80500793457},{-696.39215087891, 1161.1865234375, 30.40217590332},{-693.37347412109, 1162.6166992188, 30.259754180908},{-685.74652099609, 1165.9919433594, 29.888940811157},{-679.23315429688, 1168.5994873047, 29.562301635742},{-678.42962646484, 1168.8869628906, 29.525074005127},{-670.57208251953, 1171.6701660156, 29.163496017456},{-664.12731933594, 1173.6430664063, 28.89432144165},{-656.12414550781, 1175.7255859375, 28.589965820313},{-655.30249023438, 1175.8988037109, 28.562017440796},{-637.50457763672, 1179.6677246094, 28.039991378784},{-601.64221191406, 1187.345703125, 27.442850112915},{-592.69049072266, 1189.2683105469, 27.411064147949},{-558.4501953125, 1196.6181640625, 27.760164260864},{-471.97711181641, 1214.9438476563, 29.98837852478},{-432.12707519531, 1223.9165039063, 30.818004608154},{-393.91613769531, 1232.19921875, 31.247308731079},{-371.13647460938, 1237.1282958984, 31.154083251953},{-362.17736816406, 1239.2541503906, 31.053350448608},{-352.42523193359, 1241.794921875, 30.9137840271},{-291.45440673828, 1257.8638916016, 29.716806411743},{-282.61492919922, 1260.021484375, 29.481023788452},{-267.94268798828, 1263.3157958984, 29.070886611938},{-244.96780395508, 1268.111328125, 28.186834335327},{-235.88739013672, 1269.8527832031, 27.713052749634},{-225.24057006836, 1271.7626953125, 27.066627502441},{-204.87358093262, 1275.2172851563, 25.601978302002},{-183.28424072266, 1278.5725097656, 23.908670425415},{-174.18841552734, 1279.8568115234, 23.241781234741},{-151.13221740723, 1282.8171386719, 21.713748931885},{-133.75524902344, 1284.8376464844, 20.711910247803},{-124.67498016357, 1285.8509521484, 20.297008514404},{-104.78033447266, 1287.9389648438, 19.630247116089},{-93.958374023438, 1288.9716796875, 19.35612487793},{-84.852745056152, 1289.7966308594, 19.182443618774},{-74.074264526367, 1290.7097167969, 19.039278030396},{-64.9521484375, 1291.3702392578, 18.915048599243},{-39.258007049561, 1292.9034423828, 18.555318832397},{-30.065195083618, 1293.2531738281, 18.497308731079},{-14.116584777832, 1293.5395507813, 18.497308731079},{-6.6759190559387, 1293.5856933594, 18.497308731079},{2.4617087841034, 1293.5313720703, 18.497308731079},{8.280327796936, 1293.4266357422, 18.500381469727},{17.40625, 1293.1497802734, 18.542360305786},{23.202175140381, 1292.8959960938, 18.593679428101},{32.342155456543, 1292.3354492188, 18.714414596558},{38.127494812012, 1291.8720703125, 18.823614120483},{47.20272064209, 1291.0246582031, 19.07240486145},{52.170127868652, 1290.4848632813, 19.247114181519},{61.248313903809, 1289.3323974609, 19.570446014404},{66.148986816406, 1288.6079101563, 19.751564025879},{75.268478393555, 1287.0988769531, 20.128831863403},{80.188301086426, 1286.1809082031, 20.352712631226},{89.251846313477, 1284.3310546875, 20.766889572144},{101.59806060791, 1281.4860839844, 21.333229064941},{106.45999145508, 1280.2761230469, 21.556293487549},{107.27350616455, 1280.0515136719, 21.593782424927},{116.01286315918, 1277.6037597656, 21.996746063232},{128.62457275391, 1273.6389160156, 22.496150970459},{134.08549499512, 1271.8254394531, 22.646375656128},{142.76330566406, 1268.8020019531, 22.884035110474},{148.19760131836, 1266.8049316406, 23.024034500122},{156.79922485352, 1263.4484863281, 23.169624328613},{169.93524169922, 1257.9296875, 23.247308731079},{199.70593261719, 1244.8603515625, 23.247308731079},{217.38320922852, 1237.8154296875, 23.247308731079},{222.84280395508, 1235.7321777344, 23.247308731079},{230.77914428711, 1232.8519287109, 23.247308731079},{245.87380981445, 1227.7937011719, 23.247308731079},{253.82666015625, 1225.3041992188, 23.247308731079},{268.92584228516, 1220.9089355469, 23.247308731079},{269.65032958984, 1220.71875, 23.247308731079},{278.60311889648, 1218.3930664063, 23.247308731079},{285.9501953125, 1216.6345214844, 23.242080688477},{294.9111328125, 1214.6281738281, 23.201128005981},{301.42498779297, 1213.2700195313, 23.150239944458},{310.43536376953, 1211.5657958984, 23.079845428467},{317.79327392578, 1210.3198242188, 23.013038635254},{326.861328125, 1208.92578125, 22.859933853149},{333.45135498047, 1208.0206298828, 22.701881408691},{342.59259033203, 1206.9755859375, 22.447538375854},{349.96054077148, 1206.3061523438, 22.206323623657},{358.24053955078, 1205.669921875, 21.874723434448},{365.0178527832, 1205.2587890625, 21.554410934448},{374.14102172852, 1204.9163818359, 21.121545791626},{380.63934326172, 1204.8217773438, 20.812021255493},{389.80767822266, 1204.8743896484, 20.373538970947},{396.44213867188, 1205.0498046875, 20.052276611328},{405.6318359375, 1205.515625, 19.568494796753},{412.38739013672, 1206.0343017578, 19.182203292847},{420.64562988281, 1206.8470458984, 18.678895950317},{427.220703125, 1207.6635742188, 18.253023147583},{427.95858764648, 1207.7758789063, 18.207685470581},{436.22155761719, 1209.0516357422, 17.702466964722},{442.77160644531, 1210.263671875, 17.323085784912},{451.76098632813, 1212.1252441406, 16.798133850098},{457.34063720703, 1213.4091796875, 16.472040176392},{466.33801269531, 1215.7648925781, 15.979974746704},{471.97668457031, 1217.4235839844, 15.687877655029},{480.71539306641, 1220.2858886719, 15.192415237427},{486.89556884766, 1222.5451660156, 14.821821212769},{494.67031860352, 1225.6265869141, 14.413812637329},{500.03088378906, 1227.9326171875, 14.175323486328},{500.85107421875, 1228.318359375, 14.141884803772},{508.44445800781, 1231.9084472656, 13.834208488464},{514.34344482422, 1234.9575195313, 13.618738174438},{522.32092285156, 1239.2902832031, 13.338663101196},{540.46026611328, 1249.5944824219, 12.817432403564},{595.310546875, 1280.9868164063, 12.247308731079},{636.2783203125, 1305.1020507813, 12.247308731079},{647.53802490234, 1312.1672363281, 12.247308731079},{660.83923339844, 1320.9696044922, 12.247308731079},{668.39270019531, 1326.2241210938, 12.247308731079},{671.05999755859, 1328.158203125, 12.247308731079},{680.32476806641, 1335.1530761719, 12.247308731079},{688.09759521484, 1341.4040527344, 12.247308731079},{698.39990234375, 1350.1254882813, 12.247308731079},{699.00573730469, 1350.7165527344, 12.247308731079},{704.90100097656, 1356.5084228516, 12.247308731079},{705.43316650391, 1357.0986328125, 12.247308731079},{705.99047851563, 1357.7895507813, 12.242931365967},{711.52990722656, 1364.8902587891, 12.185474395752},{712.42883300781, 1366.2468261719, 12.169971466064},{717.20941162109, 1374.123046875, 12.122308731079},{717.99206542969, 1375.6055908203, 12.122308731079},{718.35888671875, 1376.3701171875, 12.122308731079},{721.88854980469, 1383.79296875, 12.122308731079},{723.14617919922, 1386.8753662109, 12.119437217712},{726.28259277344, 1395.3994140625, 12.070510864258},{727.32592773438, 1398.607421875, 12.037614822388},{727.56494140625, 1399.42578125, 12.029536247253},{729.86694335938, 1407.3758544922, 11.951310157776},{731.09313964844, 1412.2817382813, 11.905323028564},{733.12475585938, 1421.3249511719, 11.823406219482},{734.107421875, 1426.29296875, 11.776941299438},{735.66320800781, 1435.2982177734, 11.659734725952},{736.62023925781, 1441.8579101563, 11.556365966797},{737.703125, 1450.0966796875, 11.458768844604},{738.55993652344, 1457.5535888672, 11.39573764801},{739.47619628906, 1466.6474609375, 11.253246307373},{740.19702148438, 1474.994140625, 11.07412815094},{740.8681640625, 1484.140625, 10.915494918823},{741.42492675781, 1493.3276367188, 10.783171653748},{741.83764648438, 1501.5657958984, 10.640991210938},{742.87139892578, 1530.7132568359, 10.07043170929},{743.06628417969, 1539.9075927734, 9.8977813720703},{743.36291503906, 1594.0295410156, 8.7146110534668},{742.51416015625, 1783.5192871094, 5.920033454895},{740.65393066406, 2022.4227294922, 7.1171369552612},{740.54162597656, 2031.6684570313, 7.463095664978},{739.20568847656, 2119.1943359375, 13.05714225769},{739.16833496094, 2134.1591796875, 13.926094055176},{739.23937988281, 2153.3044433594, 15.036617279053},{739.09057617188, 2162.4389648438, 15.566160202026},{738.64038085938, 2174.9626464844, 16.231929779053},{738.17248535156, 2186.5361328125, 16.834882736206},{738.14916992188, 2187.3342285156, 16.878719329834},{737.92333984375, 2196.5458984375, 17.343616485596},{737.75219726563, 2205.7846679688, 17.66773223877},{737.59613037109, 2210.8269042969, 17.794771194458},{737.47961425781, 2213.3427734375, 17.845293045044},{737.10791015625, 2220.0122070313, 17.955114364624},{736.3203125, 2231.55078125, 18.173311233521},{735.49243164063, 2240.568359375, 18.362321853638},{735.09704589844, 2243.9760742188, 18.430925369263},{733.93603515625, 2253.1220703125, 18.61358833313},{733.48962402344, 2256.4025878906, 18.673086166382},{732.31713867188, 2265.4841308594, 18.796083450317},{728.8359375, 2294.4333496094, 19.163774490356},{728.15631103516, 2301.1091308594, 19.219800949097},{727.42095947266, 2310.1806640625, 19.329565048218},{726.9697265625, 2317.59765625, 19.440423965454},{726.48901367188, 2326.7858886719, 19.540811538696},{725.84722900391, 2342.78125, 19.660501480103},{725.61669921875, 2351.0649414063, 19.721809387207},{725.5, 2360.1201171875, 19.788331985474},{725.51708984375, 2368.3762207031, 19.852796554565},{725.64428710938, 2376.6372070313, 19.944425582886},{725.89575195313, 2385.0031738281, 20.06304359436},{726.37225341797, 2394.1369628906, 20.159534454346},{726.98840332031, 2402.4443359375, 20.219730377197},{727.86413574219, 2411.546875, 20.285690307617},{728.84191894531, 2419.8505859375, 20.348825454712},{730.08044433594, 2428.9174804688, 20.451396942139},{731.36749267578, 2437.1625976563, 20.568332672119},{732.99542236328, 2446.185546875, 20.663805007935},{734.50427246094, 2453.5678710938, 20.71893119812},{736.66271972656, 2462.5549316406, 20.786550521851},{738.66223144531, 2469.8256835938, 20.841676712036},{738.91217041016, 2470.5874023438, 20.847555160522},{741.54443359375, 2478.5258789063, 20.908929824829},{741.85052490234, 2479.3193359375, 20.91517829895},{744.56518554688, 2486.3090820313, 20.969858169556},{748.0302734375, 2494.7104492188, 21.031518936157},{773.64758300781, 2552.5493164063, 21.247308731079},{781.76190185547, 2570.0739746094, 21.247308731079},{792.98779296875, 2593.1616210938, 21.247308731079},{809.97204589844, 2626.7275390625, 21.247308731079},{828.46533203125, 2662.205078125, 21.247308731079},{834.57983398438, 2672.9477539063, 21.247308731079},{839.11633300781, 2679.7783203125, 21.247308731079},{839.62927246094, 2680.4545898438, 21.247308731079},{842.67620849609, 2684.416015625, 21.247308731079},{847.90380859375, 2690.9516601563, 21.247308731079},{858.70861816406, 2703.7314453125, 21.207092285156},{863.66320800781, 2709.390625, 21.1461353302},{869.91455078125, 2716.0830078125, 21.035318374634},{874.64172363281, 2720.8271484375, 20.930534362793},{881.31042480469, 2727.0852050781, 20.785917282104},{886.28289794922, 2731.4206542969, 20.680477142334},{893.51379394531, 2737.1123046875, 20.531120300293},{898.17034912109, 2740.4145507813, 20.435260772705},{898.92761230469, 2740.8889160156, 20.416666030884},{905.97473144531, 2745.2470703125, 20.240888595581},{911.06787109375, 2747.9675292969, 20.098167419434},{911.79772949219, 2748.2973632813, 20.081504821777},{919.49029541016, 2751.7133789063, 19.909761428833},{925.00708007813, 2753.7006835938, 19.804292678833},{925.82836914063, 2753.9309082031, 19.775972366333},{933.90960693359, 2756.130859375, 19.484954833984},{939.61138916016, 2757.203125, 19.199026107788},{940.44775390625, 2757.3032226563, 19.162969589233},{948.66479492188, 2758.228515625, 18.814483642578},{953.59875488281, 2758.435546875, 18.639122009277},{954.40533447266, 2758.4477539063, 18.609104156494},{962.83312988281, 2758.5561523438, 18.294717788696},{963.68933105469, 2758.5405273438, 18.262712478638},{986.20855712891, 2758.1484375, 17.376922607422},{993.74462890625, 2757.97265625, 16.998174667358},{994.48217773438, 2757.9067382813, 16.969003677368},{1002.7250366211, 2757.1064453125, 16.629016876221},{1003.5415039063, 2756.9765625, 16.609102249146},{1004.3160400391, 2756.8276367188, 16.587368011475},{1005.1424560547, 2756.6535644531, 16.562477111816},{1013.270690918, 2754.90234375, 16.313533782959},{1014.8781738281, 2754.4404296875, 16.260063171387},{1023.6477050781, 2751.5500488281, 16.004127502441},{1025.9718017578, 2750.5974121094, 15.94931602478},{1033.6337890625, 2747.1831054688, 15.767930030823},{1034.3984375, 2746.80078125, 15.749725341797},{1036.62109375, 2745.6538085938, 15.697050094604},{1044.5876464844, 2741.3125, 15.50980758667},{1047.4301757813, 2739.6384277344, 15.443696975708},{1055.1937255859, 2734.873046875, 15.263153076172},{1058.0183105469, 2733.0275878906, 15.197540283203},{1065.5153808594, 2727.6662597656, 15.024255752563},{1075.9476318359, 2719.2924804688, 14.784433364868},{1091.3259277344, 2706.6171875, 14.431030273438},{1098.5783691406, 2701.0258789063, 14.265413284302},{1108.5041503906, 2693.4968261719, 14.038882255554},{1120.1513671875, 2684.2087402344, 13.771129608154},{1134.5013427734, 2672.6987304688, 13.351438522339},{1141.7424316406, 2667.1118164063, 13.146907806396},{1152.4730224609, 2659.3186035156, 12.897943496704},{1155.8850097656, 2656.9770507813, 12.817752838135},{1163.6354980469, 2651.94140625, 12.636600494385},{1166.5607910156, 2650.205078125, 12.56845664978},{1173.8955078125, 2646.2905273438, 12.396823883057},{1174.6037597656, 2645.9658203125, 12.3801612854},{1177.5983886719, 2644.6198730469, 12.309510231018},{1185.1779785156, 2641.3217773438, 12.129977226257},{1187.5106201172, 2640.3901367188, 12.074167251587},{1196.1658935547, 2637.216796875, 11.865213394165},{1197.0319824219, 2636.951171875, 11.844232559204},{1197.7546386719, 2636.755859375, 11.826921463013},{1205.8002929688, 2634.6086425781, 11.634360313416},{1206.6209716797, 2634.4345703125, 11.615051269531},{1208.2274169922, 2634.142578125, 11.576847076416},{1216.4051513672, 2632.8503417969, 11.380719184875},{1217.1994628906, 2632.7631835938, 11.361347198486},{1218.0473632813, 2632.7041015625, 11.348234176636},{1218.8973388672, 2632.6579589844, 11.337957382202},{1227.2082519531, 2632.25, 11.247308731079},{1602.2878417969, 2632.2739257813, 11.247308731079},{1603.9637451172, 2632.3125, 11.247308731079},{1604.751953125, 2632.3125, 11.247308731079},{1605.5883789063, 2632.3234863281, 11.247308731079},{1606.4246826172, 2632.4030761719, 11.247308731079},{1608.0493164063, 2632.5964355469, 11.247308731079},{1608.8856201172, 2632.7292480469, 11.247308731079},{1611.30078125, 2633.1513671875, 11.247308731079},{1612.0665283203, 2633.2844238281, 11.247308731079},{1612.8784179688, 2633.404296875, 11.247308731079},{1614.5551757813, 2633.7041015625, 11.247308731079},{1615.4418945313, 2633.9306640625, 11.247308731079},{1616.2309570313, 2634.0791015625, 11.247308731079},{1616.9747314453, 2634.2685546875, 11.247308731079},{1618.6533203125, 2634.650390625, 11.247308731079},{1620.2770996094, 2635.0322265625, 11.247308731079},{1621.8542480469, 2635.3605957031, 11.247308731079},{1622.7009277344, 2635.478515625, 11.247308731079},{1623.6032714844, 2635.6245117188, 11.247308731079},{1624.4125976563, 2635.7290039063, 11.247308731079},{1625.2016601563, 2635.7836914063, 11.247308731079},{1625.9920654297, 2635.8642578125, 11.247308731079},{1627.6640625, 2636.0131835938, 11.247308731079},{1629.3388671875, 2636.1867675781, 11.247308731079},{1631.0415039063, 2636.3132324219, 11.247308731079},{1631.8438720703, 2636.3203125, 11.247308731079},{1635.2017822266, 2636.3818359375, 11.247308731079},{1636.8479003906, 2636.486328125, 11.247308731079},{1645.1442871094, 2637.0913085938, 11.247308731079},{1646.7700195313, 2637.2600097656, 11.247308731079},{1647.6080322266, 2637.3676757813, 11.247308731079},{1655.8486328125, 2638.4455566406, 11.247308731079},{1657.4776611328, 2638.7138671875, 11.247308731079},{1658.3099365234, 2638.8657226563, 11.247308731079},{1667.2614746094, 2640.5278320313, 11.247308731079},{1668.8665771484, 2640.8688964844, 11.247308731079},{1677.8500976563, 2642.9165039063, 11.247308731079},{1689.1885986328, 2645.8251953125, 11.247308731079},{1691.5915527344, 2646.4897460938, 11.247308731079},{1700.3310546875, 2649.0739746094, 11.247308731079},{1722.4200439453, 2656.2670898438, 11.247308731079},{1783.0847167969, 2677.7431640625, 11.247308731079},{1794.1110839844, 2681.3051757813, 11.247308731079},{1802.8134765625, 2683.919921875, 11.247308731079},{1815.7813720703, 2687.4992675781, 11.247308731079},{1824.8038330078, 2689.685546875, 11.247308731079},{1826.4318847656, 2690.0244140625, 11.247308731079},{1835.4235839844, 2691.7172851563, 11.247308731079},{1837.0380859375, 2691.9682617188, 11.247308731079},{1846.0673828125, 2693.16796875, 11.247308731079},{1847.7493896484, 2693.3247070313, 11.247308731079},{1856.8975830078, 2693.9499511719, 11.247308731079},{1857.7534179688, 2693.9692382813, 11.247308731079},{1866.9504394531, 2694.125, 11.247308731079},{2146.0695800781, 2694.1042480469, 11.265293121338},{2150.2138671875, 2693.94921875, 11.256297111511},{2155.2587890625, 2693.6052246094, 11.247308731079},{2156.0595703125, 2693.4680175781, 11.247308731079},{2156.9091796875, 2693.30859375, 11.247308731079},{2159.2197265625, 2692.861328125, 11.247308731079},{2162.544921875, 2692.1674804688, 11.247308731079},{2164.244140625, 2691.8647460938, 11.247308731079},{2165.09375, 2691.65234375, 11.247308731079},{2165.89453125, 2691.4729003906, 11.247308731079},{2166.6589355469, 2691.333984375, 11.247308731079},{2170.7275390625, 2690.6408691406, 11.247308731079},{2171.5771484375, 2690.5346679688, 11.247308731079},{2173.2275390625, 2690.3557128906, 11.247308731079},{2174.9267578125, 2690.2321777344, 11.247308731079},{2175.7275390625, 2690.20703125, 11.247308731079},{2179.0727539063, 2690.125, 11.247308731079},{2434.0678710938, 2690.1052246094, 11.247308731079},{2443.2475585938, 2689.8088378906, 11.247308731079},{2444.884765625, 2689.654296875, 11.247308731079},{2453.1337890625, 2688.5847167969, 11.247308731079},{2453.9663085938, 2688.4201660156, 11.247308731079},{2454.7937011719, 2688.2250976563, 11.247308731079},{2455.5712890625, 2688.0275878906, 11.247308731079},{2463.6752929688, 2685.92578125, 11.247308731079},{2464.4750976563, 2685.638671875, 11.247308731079},{2465.220703125, 2685.353515625, 11.247308731079},{2472.9741210938, 2682.3347167969, 11.247308731079},{2473.7243652344, 2681.958984375, 11.247308731079},{2481.6701660156, 2677.7749023438, 11.247308731079},{2482.4213867188, 2677.2934570313, 11.247308731079},{2483.0830078125, 2676.8500976563, 11.247308731079},{2489.9204101563, 2672.2124023438, 11.247308731079},{2490.61328125, 2671.6352539063, 11.247308731079},{2497.6198730469, 2665.7258300781, 11.247308731079},{2498.2197265625, 2665.1311035156, 11.247308731079},{2504.6474609375, 2658.6938476563, 11.247308731079},{2505.1713867188, 2658.0825195313, 11.247308731079},{2511.1520996094, 2651.015625, 11.247308731079},{2516.5739746094, 2643.63671875, 11.247308731079},{2517.4990234375, 2642.2358398438, 11.247308731079},{2522.3640136719, 2634.5520019531, 11.247308731079},{2522.7834472656, 2633.80859375, 11.247308731079},{2527.2783203125, 2625.787109375, 11.247308731079},{2527.6555175781, 2625.0224609375, 11.247308731079},{2531.6801757813, 2616.7705078125, 11.247308731079},{2532.0092773438, 2615.9816894531, 11.247308731079},{2535.5007324219, 2607.5197753906, 11.247308731079},{2538.6508789063, 2598.9267578125, 11.247308731079},{2538.9150390625, 2598.1328125, 11.247308731079},{2539.1669921875, 2597.3303222656, 11.247308731079},{2541.6059570313, 2589.4775390625, 11.247308731079},{2541.81640625, 2588.6584472656, 11.247308731079},{2544.0463867188, 2579.828125, 11.247308731079},{2545.8173828125, 2571.6982421875, 11.247308731079},{2545.9602050781, 2570.8549804688, 11.247308731079},{2547.3071289063, 2562.6000976563, 11.247308731079},{2548.0737304688, 2555.8486328125, 11.247308731079},{2548.1411132813, 2555.0434570313, 11.247308731079},{2548.1987304688, 2554.1870117188, 11.247308731079},{2548.57421875, 2548.29296875, 11.247308731079},{2548.634765625, 2546.6904296875, 11.247308731079},{2548.75, 2539.1533203125, 11.247308731079},{2548.7368164063, 2482.4541015625, 11.247308731079},{2548.7668457031, 2481.6044921875, 11.247308731079},{2548.8688964844, 2480.0180664063, 11.247308731079},{2549.0324707031, 2478.4208984375, 11.247308731079},{2549.1608886719, 2477.6201171875, 11.247308731079},{2549.8430175781, 2473.4604492188, 11.247308731079},{2550.3125, 2471.064453125, 11.247308731079},{2550.4516601563, 2470.3461914063, 11.247308731079},{2550.623046875, 2469.5625, 11.247308731079},{2550.82421875, 2468.7509765625, 11.247308731079},{2551.0004882813, 2467.953125, 11.247308731079},{2551.8803710938, 2463.81640625, 11.247308731079},{2552.0053710938, 2463.015625, 11.247308731079},{2552.2124023438, 2461.330078125, 11.247308731079},{2552.4350585938, 2458.859375, 11.247308731079},{2552.4858398438, 2458.0620117188, 11.243949890137},{2552.6335449219, 2455.5771484375, 11.232517242432},{2552.66015625, 2454.7329101563, 11.228631019592},{2552.6997070313, 2453.080078125, 11.221082687378},{2552.75, 2448.8620605469, 11.197422027588},{2552.7451171875, 2443.91015625, 11.142629623413},{2552.7036132813, 2434.7651367188, 10.983125686646},{2552.625, 2412.1010742188, 10.348855018616},{2552.625, 2403.0092773438, 9.9539165496826},{2552.625, 2380.6960449219, 8.6944484710693},{2552.625, 2371.4020996094, 8.0239849090576},{2552.6657714844, 2355.4233398438, 6.6349306106567},{2552.75, 2333.0400390625, 4.4264364242554},{2552.75, 2332.1862792969, 4.3719120025635},{2552.7580566406, 2328.0319824219, 4.1154193878174},{2552.8044433594, 2323.90234375, 3.926201581955},{2552.837890625, 2322.2514648438, 3.899022102356},{2552.9409179688, 2318.9072265625, 3.8487648963928},{2553.1831054688, 2313.2006835938, 3.8106489181519},{2553.2915039063, 2311.5141601563, 3.7943103313446},{2553.3625488281, 2310.7197265625, 3.7898945808411},{2554.1225585938, 2302.4362792969, 3.7473087310791},{2554.8393554688, 2296.6364746094, 3.7465846538544},{2554.9870605469, 2295.8500976563, 3.7363474369049},{2556.5434570313, 2287.6567382813, 3.626437664032},{2556.7534179688, 2286.8310546875, 3.6047034263611},{2558.00390625, 2281.9760742188, 3.4766178131104},{2558.2314453125, 2281.205078125, 3.4556746482849},{2560.626953125, 2273.1643066406, 3.2367308139801},{2562.2666015625, 2268.3999023438, 3.1024324893951},{2562.5903320313, 2267.6071777344, 3.0790944099426},{2565.796875, 2259.884765625, 2.8507108688354},{2567.6630859375, 2256.0810546875, 2.7273428440094},{2571.9736328125, 2248.0383300781, 2.3771631717682},{2574.0659179688, 2244.51171875, 2.1845681667328},{2574.537109375, 2243.8095703125, 2.1478683948517},{2579.2104492188, 2236.9306640625, 1.7901840209961},{2581.7734375, 2233.6313476563, 1.6263593435287},{2587.5805664063, 2226.4731445313, 1.265154838562},{2589.7944335938, 2223.9436035156, 1.1290476322174},{2595.501953125, 2217.9321289063, 0.76690936088562},{2596.0720214844, 2217.3920898438, 0.72940671443939},{2599.0954589844, 2214.5659179688, 0.53588342666626},{2605.9155273438, 2208.4733886719, 0.13990497589111},{2614.9423828125, 2201, -0.31999659538269},{2618.2602539063, 2198.3959960938, -0.48121690750122},{2625.5639648438, 2192.990234375, -0.82834100723267},{2636.4802246094, 2185.478515625, -1.283980846405},{2651.0478515625, 2175.7316894531, -1.6934413909912},{2669.1870117188, 2163.8920898438, -2.0026912689209},{2683.1811523438, 2154.599609375, -1.9128041267395},{2690.662109375, 2149.4008789063, -1.7743892669678},{2703.322265625, 2140.1306152344, -1.3842587471008},{2703.9892578125, 2139.6062011719, -1.3590931892395},{2711.1520996094, 2133.9357910156, -1.088189125061},{2713.7202148438, 2131.7763671875, -0.98545622825623},{2720.6147460938, 2125.7575683594, -0.6649055480957},{2723.0859375, 2123.4931640625, -0.52993059158325},{2729.7124023438, 2117.0595703125, -0.11989855766296},{2732.6235351563, 2114.0229492188, 0.08341908454895},{2738.822265625, 2107.2490234375, 0.52428126335144},{2740.9790039063, 2104.75, 0.68156462907791},{2741.4763183594, 2104.123046875, 0.71954774856567},{2746.6511230469, 2097.5524902344, 1.1163539886475},{2749.1010742188, 2094.1193847656, 1.3146728277206},{2754.2338867188, 2086.4936523438, 1.7395801544189},{2756.8354492188, 2082.3134765625, 1.9628081321716},{2761.2897949219, 2074.3950195313, 2.3713130950928},{2763.533203125, 2069.9204101563, 2.5889611244202},{2767.0571289063, 2062.3803710938, 2.9153246879578},{2769.3112792969, 2057.0751953125, 3.1148703098297},{2772.5483398438, 2048.39453125, 3.4618220329285},{2774.6022949219, 2041.9982910156, 3.7218766212463},{2776.8818359375, 2033.9086914063, 3.985502243042},{2777.0656738281, 2033.1433105469, 4.0038709640503},{2778.591796875, 2026.7119140625, 4.1646032333374},{2779.2749023438, 2023.4575195313, 4.2617859840393},{2780.4538574219, 2017.7385253906, 4.3879961967468},{2781.0615234375, 2014.3859863281, 4.4734120368958},{2781.9208984375, 2009.4537353516, 4.5600538253784},{2782.7954101563, 2002.9439697266, 4.6781849861145},{2783.0825195313, 2000.4602050781, 4.7132868766785},{2783.9184570313, 1990.5053710938, 4.8393325805664},{2784.46484375, 1981.4020996094, 4.9418387413025},{2784.7456054688, 1973.1196289063, 4.99582862854},{2784.802734375, 1968.9514160156, 4.9973087310791},{2784.7687988281, 1965.5792236328, 4.9973087310791},{2784.7065429688, 1963.9365234375, 4.9973087310791},{2784.6333007813, 1963.0725097656, 4.9973087310791},{2784.5173339844, 1962.1938476563, 4.9973087310791},{2784.1594238281, 1959.6313476563, 4.9973087310791},{2784.0258789063, 1958.8646240234, 4.9973087310791},{2783.5837402344, 1956.4775390625, 4.9973087310791},{2783.0400390625, 1954.0247802734, 4.9973087310791},{2782.798828125, 1953.1704101563, 4.9973087310791},{2782.619140625, 1952.3211669922, 4.9973087310791},{2782.0864257813, 1949.8862304688, 4.9973087310791},{2781.9697265625, 1949.1551513672, 4.9973087310791},{2781.2309570313, 1944.2746582031, 4.9973087310791},{2781.1669921875, 1943.4318847656, 4.9973087310791},{2781, 1940.9620361328, 4.9973087310791},{2781, 1940.1467285156, 4.9973087310791},{2781, 1930.9884033203, 5.0194869041443},{2781, 1921.8232421875, 5.2721476554871},{2781, 1918.4714355469, 5.4537305831909},{2781, 1909.3354492188, 6.0636987686157},{2781, 1894.3410644531, 7.4190368652344},{2781, 1868.470703125, 10.036798477173},{2781, 1859.3289794922, 10.670483589172},{2781, 1856.7927246094, 10.793947219849},{2781, 1848.5072021484, 11.127791404724},{2781, 1847.6707763672, 11.139596939087},{2781, 1839.447265625, 11.247308731079},{2780.9326171875, 1803.4956054688, 11.247308731079},{2780.875, 1793.3840332031, 11.247308731079},{2780.8933105469, 1703.3482666016, 11.247308731079},{2780.9375, 1700.0673828125, 11.247308731079},{2780.9592285156, 1694.2678222656, 11.247308731079},{2781, 1690.8625488281, 11.247308731079},{2781.0087890625, 1662.5013427734, 11.247308731079},{2781.140625, 1654.291015625, 11.247308731079},{2781.2099609375, 1653.4366455078, 11.247308731079},{2781.5258789063, 1650.09375, 11.247308731079},{2782.0112304688, 1646.8798828125, 11.247308731079},{2782.2197265625, 1646.1197509766, 11.247308731079},{2782.4536132813, 1645.3497314453, 11.247308731079},{2782.6926269531, 1644.6175537109, 11.247308731079},{2783.2158203125, 1643.0593261719, 11.247308731079},{2783.5056152344, 1642.3220214844, 11.247308731079},{2783.8515625, 1641.5511474609, 11.247308731079},{2785.29296875, 1638.5717773438, 11.247308731079},{2785.7299804688, 1637.9213867188, 11.247308731079},{2787.5854492188, 1635.1940917969, 11.247308731079},{2789.6108398438, 1632.4562988281, 11.247308731079},{2790.6418457031, 1631.1584472656, 11.247308731079},{2795.4875488281, 1625.2985839844, 11.247308731079},{2802.97265625, 1616.4868164063, 11.247308731079}}
local trainTrackLength = 18129.582799971

local trainSpawnPoint = {
	x = 2840.87598, y = 1566.80945, z = 10.82031
}

--[[
	This table is used to find the train position quicker, by making a smaller summary of it. 
]]
local quickIndex = {}
--

--[[
	Train Speed
]]
local trainSpeed = 1


--[[
	How long it takes to cycle the map. This will be filled in later in the code.
]]
local duration = 0


--[[
	For making the train synced across all clients and server, there is a timing value used.
	Pros:
	- Easier to maintain
	- This will reduce network (only one message is needed, which will allow all other clients to do the same thing)
	
	Cons:
	- Flexibility (you can't stop a train, unless you stop them all)
]]

local startClientTiming = 0
local serverTiming = 0

addEvent("syncTrainsTiming",true)
addEventHandler("syncTrainsTiming",resourceRoot,
function (serverTiming_)
	
	startClientTiming = getTickCount()
	serverTiming = tonumber(serverTiming_)
end)


--[[
	All trains including data
	- Format: array
]]
local trainDataContainer = {}

--[[
	Configuration of the trains from serverside - used to create the trains
	- Format: array
]]
local trainServersideData

--[[
	The server gives the client everything he needs to run the script
]]
addEvent("onClientTrainResourceStart",true)
addEventHandler("onClientTrainResourceStart",resourceRoot,
function (amountOfTrains,trainSpeed_,trainServersideData_, serverTiming_)
	trainServersideData = trainServersideData_
	
	-- loading/calculating serverside settings --
	duration = trainTrackLength/(trainSpeed_/1000)
	trainSpeed = trainSpeed_
	startClientTiming = getTickCount()
	serverTiming = tonumber(serverTiming_)

	---------------------------------------------
	
	--[[
		Traintrack set-up + BEGIN and END position
	]]
	local beginPosX, beginPosY, beginPosZ = trainLocationTable[1][1], trainLocationTable[1][2], trainLocationTable[1][3]
	local endPosX,endPosY,endPosZ = trainLocationTable[#trainLocationTable][1],trainLocationTable[#trainLocationTable][2],trainLocationTable[#trainLocationTable][3]
	local distanceTrainTrack = 0--

	for i=1,#trainLocationTable do
		local data = trainLocationTable[i]
		local data2 = trainLocationTable[i+1]
		if data2 then
			local distanceBetweenPoints = getDistanceBetweenPoints3D(data[1],data[2],data[3],data2[1],data2[2],data2[3])
			distanceTrainTrack = distanceTrainTrack + distanceBetweenPoints

			data2[4] = distanceTrainTrack
		end
	end
	
	local distanceBetweenPoints = getDistanceBetweenPoints3D(beginPosX,beginPosY,beginPosZ,endPosX,endPosY,endPosZ)
	trainLocationTable[1][4] = distanceTrainTrack + distanceBetweenPoints
	
	
	for trainIndex=1,amountOfTrains do
		local trainStartLocation = (trainTrackLength/amountOfTrains)*trainIndex
		
		local trainTrackIndex = 1
		repeat
			trainTrackIndex = trainTrackIndex + 1
			local isNextPoint
			local trainTrackPointData = trainLocationTable[trainTrackIndex]
			if trainTrackIndex < #trainLocationTable + 1 then
				isNextPoint = trainStartLocation < trainTrackPointData[4]
				if isNextPoint then
					trainTrackIndex = trainTrackIndex - 1
				end
			else
				trainTrackIndex = 1
				isNextPoint = true
			end
		until isNextPoint
		
		
		local trainStartPoint = trainLocationTable[trainTrackIndex]
		local spawnX,spawnY,spawnZ = trainStartPoint[1],trainStartPoint[2],trainStartPoint[3]
		trainDataContainer[#trainDataContainer+1] = {["startLocation"]=trainStartLocation,["spawnLocation"]={spawnX,spawnY,spawnZ}}

	end
	
	addEventHandler("onClientPreRender", root, renderTrainPosition)
end)



local destroyTrain = function (trainIndex)
	local trainData = trainDataContainer[trainIndex]
	if trainData then
		
		-- train
		local previousTrain = trainData["train"]
		if previousTrain then 
			if isElement(previousTrain) then
				destroyElement(previousTrain)
			end
			trainData["train"] = nil
		end
		
		-- driver
		local previousDriver = trainData["driver"]
		if previousDriver then
			if isElement(previousDriver) then
				destroyElement(previousDriver)
			end
			trainData["driver"] = nil
		end
		
		-- carts
		local trainCarts = trainData["trainCarts"]
		if trainCarts then
			for i=1,#trainCarts do
				local trainCart = trainCarts[i]
				if isElement(trainCart) then
					destroyElement(trainCart)
				end
			end
			trainData["trainCarts"] = nil
		end
		
		return true
	end
end



local createTrain = function (trainIndex,spawnX,spawnY,spawnZ)		
	local trainServerData = trainServersideData[trainIndex]
	local trainData = trainDataContainer[trainIndex]
	if trainServerData and trainData then
		if trainData["train"] or trainData["driver"] or trainData["trainCarts"] then
			destroyTrain(trainIndex)
		end
		
		
		local train = createVehicle ( trainServerData["model"], trainSpawnPoint.x, trainSpawnPoint.y, trainSpawnPoint.z, 0, 0, 0 )
		
		if train then
			
			setElementPosition(train, spawnX,spawnY,spawnZ, false)

			
			setVehicleDamageProof(train,true)

			setTrainDirection ( train, true )
			
			
			
			local trainBlip = createBlipAttachedTo ( train, 0, 1, 100, 100, 100, 255, -100, 600)
			
			setElementParent(trainBlip,train)
			
			
			local driver = createPed(trainServerData["driver"],0,0,0)
			
			warpPedIntoVehicle ( driver, train )
			
			setVehicleOverrideLights ( train, 2 )
			
			trainData["train"] = train
			trainData["driver"] = driver
			

			local trainServerData = trainServersideData[trainIndex]
			local cartsData = trainServerData["cartsData"]
			
			local trainData = trainDataContainer[trainIndex]
			
			local spawnLocation = trainData["spawnLocation"]
			trainData["trainCarts"]= {}
			local trainCarts = trainData["trainCarts"]
			for i=1,#cartsData do
				local cartData = cartsData[i]
			
				local trainCart = createVehicle (cartData.model, trainSpawnPoint.x, trainSpawnPoint.y, trainSpawnPoint.z )
				if trainCart then
					
					
					setVehicleDamageProof(trainCart,true)
					
					setVehicleOverrideLights ( trainCart, 2 )
					
					local trainCartBlip = createBlipAttachedTo ( trainCart, 0, 1, 200, 200, 200, 255, -101, 170) 
					setElementParent(trainCartBlip, trainCart)
					

					if i == 1 then
						attachTrailerToVehicle ( train, trainCart )
						trainCarts[i] = trainCart
					else
						local attachTo = trainCarts[i-1]
						attachTrailerToVehicle ( attachTo, trainCart )
						trainCarts[i] = trainCart
					end
					local attachedData = cartData["attached"]
					if attachedData then
						for i=1,#attachedData do
							local elementData = attachedData[i] 
							local elementType = elementData["elementType"]
							
							local model = elementData.model
							
							
							local element
							if elementType == "object" or not elementType then
								element = createObject(model,0,0,10000)
								if element then
									local scale = elementData["scale"]
									if scale and scale ~= 1 then
										setObjectScale(element, scale)
									end
									setElementDoubleSided(element,true)
									
									setObjectBreakable(element, false)
								end
							elseif elementType == "vehicle" then
								
								local numberplate = elementData["plate"] or "NL"
								
								element = createVehicle(model,0,0,10000, 0,0,0, numberplate)
								
								if element then
									local color = elementData["color"] 
									if color then
										setVehicleColor(element, unpack(color))
									else
										setVehicleColor(element, 38,55,57,245,245,245,0,0,0,0,0,0)
									end
									setVehicleDamageProof(element,true)
									setVehicleOverrideLights ( element, 2 )
								end
							elseif elementType == "ped" then
								element = createPed(model, 0, 0, 10000)
								if element then
									local animBlock, animName = elementData["animBlock"], elementData["animName"]
									if animBlock and animName then
										setPedAnimation(element, animBlock, animName,  -1, true, false, false)
									end
								end
							elseif elementType == "marker" then
								element = createMarker(0,0,10000, elementData["type"] or "checkpoint", elementData["size"] or 3, elementData["r"] or 0,elementData["g"] or 0,elementData["b"] or 255,  elementData["a"] or 255)
							end
							
							if element then
								local alpha = elementData["alpha"]
								if alpha and alpha ~= 255 then
									setElementAlpha(element, alpha)
								end
								
								setElementData(element, "train-component", true)
								
								setElementParent(element,trainCart)
								setElementCollidableWith(element,trainCart,false)
								local offset = elementData["offset"]
								attachElements(element,trainCart,offset[1],offset[2],offset[3],offset[4],offset[5],offset[6])
							end
						end
						
					end
				else
					break -- Should not be able to execute.
				end
			end
			
			
			return train
		end
	end
end





local math_sqrt = math.sqrt
local getDistanceBetweenPointAndSegment3D = function (pointX, pointY, pointZ, x1, y1, z1, x2, y2, z2)
	-- vector1 --
	local A = pointX - x1 
	local B = pointY - y1
	local C = pointZ - z1
	--
	-- vector2 --
	local D = x2 - x1
	local E = y2 - y1
	local F = z2 - z1
	--
	local point = A * D + B * E + C * F
	local lenSquare = D * D + E * E + F * F
	local parameter = point / lenSquare
 
	local shortestX
	local shortestY
	local shortestZ
 
	if parameter < 0 then
		shortestX = x1
    	shortestY = y1
		shortestZ = z1
	elseif parameter > 1 then
		shortestX = x2
		shortestY = y2
		shortestZ = z2

	else
		shortestX = x1 + parameter * D
		shortestY = y1 + parameter * E
		shortestZ = z1 + parameter * F
	end

	local distance = math_sqrt(((shortestX-(pointX))^2+(shortestY-(pointY))^2+(shortestZ-(pointZ))^2))
 
	return distance
end



local nextTrainCorrectionCheck = 0 -- validate issues with the train...
function renderTrainPosition ()
	-- debug train path --
	--[[
	for i=1,#trainLocationTable do
		local data = trainLocationTable[i]
		local data2 = trainLocationTable[i+1]
		if data2 then
			dxDrawLine3D(data[1],data[2],data[3],data2[1],data2[2],data2[3],tocolor(255,0,0))
		end
	end
	]]
	-----------
	local timeNow = getTickCount()
	local progress = (((timeNow - startClientTiming)+serverTiming) / duration) % 1
	
	
	


	
		
			
	for i=1,#trainDataContainer do -- trains
		
		--[[
			Basic train data
		]]
		local trainData = trainDataContainer[i]
		
		
		
		local startLocation = trainData["startLocation"]
		
		--[[
			Find out where the train should be located
		]]
		local trainTrackIndex = trainData.currentTrainIndex or 1 
		
		local trainTravelDistance = ((trainTrackLength * progress) + startLocation) % trainTrackLength
		
		
		

		

		repeat
			trainTrackIndex = trainTrackIndex + 1
		
			local stopLoop

			if trainTrackIndex > #trainLocationTable then
				trainTrackIndex = 1
			end
			
			local trainTrackPointData = trainLocationTable[trainTrackIndex]
			
			
			local isNextPoint = trainTravelDistance < trainTrackPointData[4] -- is the travel distance greater than the next travel point?	

			if trainTrackIndex == 1 and trainData.currentTrainIndex == 1416 and trainTravelDistance < 100 then -- < this condition is used to make sure the traintrack from the START and END is correctly connected. (A bit complex)
				stopLoop = true
			elseif isNextPoint then
				stopLoop = true
				trainTrackIndex = trainTrackIndex - 1
				
				if report then report.min = report.min + 1 end
		
				if trainTrackIndex < 1 then
					trainTrackIndex = #trainLocationTable
				end
			end
			
		until stopLoop
		
		
		trainData.currentTrainIndex = trainTrackIndex
		
		
		local trainStartPoint = trainLocationTable[trainTrackIndex]
		local trainStartDistance = trainStartPoint[4]
		
		local trainTrackNexIndex = trainTrackIndex + 1
		if trainTrackNexIndex > #trainLocationTable then
			trainTrackNexIndex = 1
		end
		
		local trainEndPoint = trainLocationTable[trainTrackNexIndex]
		local trainEndDistance = trainEndPoint[4]
		
		
		local distanceBetweenPoints
		
		if trainTrackIndex == 1 then -- < this is required to make sure the transition from the START and the END of the traintrack is working correctly
			distanceBetweenPoints = trainEndDistance
			trainStartDistance = 0
		else
			distanceBetweenPoints = trainEndDistance - trainStartDistance
		end
		
		
		local distanceTraveledBetweenPoints = trainTravelDistance - trainStartDistance
		
		local trainMovingProgress = distanceTraveledBetweenPoints / distanceBetweenPoints
		
		local trainPositionX, trainPositionY, trainPositionZ = interpolateBetween (trainStartPoint[1],trainStartPoint[2],trainStartPoint[3],trainEndPoint[1],trainEndPoint[2],trainEndPoint[3],trainMovingProgress,"Linear")

		--

		
		local train = trainData["train"]

		if not train then
			createTrain(i, trainPositionX,trainPositionY,trainPositionZ)
		else
			local resetTrain = false
			
			
			if true then -- < set this condition to validate every 500 ms if each train is placed correctly. It will automatic reset the train. But with a cost of performance if the reset isn't successful.
				local checkRailRoad = timeNow > nextTrainCorrectionCheck
				if checkRailRoad then
					nextTrainCorrectionCheck = timeNow + 500
					local lastTrainPositionX, lastTrainPositionY, lastTrainPositionZ = getElementPosition(train)
					
					if getDistanceBetweenPointAndSegment3D(lastTrainPositionX, lastTrainPositionY, lastTrainPositionZ, trainStartPoint[1],trainStartPoint[2],trainStartPoint[3],trainEndPoint[1],trainEndPoint[2],trainEndPoint[3]) > 3 then
						-- Train isn't placed correctly
						resetTrain = true
						destroyTrain(i)
					end
					
				end	

			end
			
			if not resetTrain then
				local isTrainStreamedIn = isElementStreamedIn(train) 
				
				local trainCarts = trainData["trainCarts"]
				for cartIndex=#trainCarts,1, -1 do
					local trainCart = trainCarts[cartIndex]
					
					if isTrainStreamedIn then -- only attach carts if the train is streamed in.
						setTrainDerailed ( trainCart, false )
						local cartIndexAttachTo = cartIndex - 1
						local partX1, partY1, partZ1 = getElementPosition(trainCart)
						if cartIndexAttachTo == 0 then
							local partX2, partY2, partZ2 = getElementPosition(train)
							
							local distance = getDistanceBetweenPoints3D(partX1, partY1, partZ1, partX2, partY2, partZ2)
							if distance < 1 or distance > 30 then
								setTrainDerailed ( trainCart, true )
								detachTrailerFromVehicle ( train, trainCart )
								attachTrailerToVehicle ( train, trainCart )
								
								setTrainDerailed ( trainCart, false )
							end
						else
							local previousCart = trainCarts[cartIndexAttachTo]
							local partX2, partY2, partZ2 = getElementPosition(previousCart)
							
							local distance = getDistanceBetweenPoints3D(partX1, partY1, partZ1, partX2, partY2, partZ2)
							if distance < 1 or distance > 30 then
								setTrainDerailed ( trainCart, true )
								detachTrailerFromVehicle ( previousCart, trainCart )
								attachTrailerToVehicle ( previousCart, trainCart )
								
								setTrainDerailed ( trainCart, false )
							end
						end
					else
						setTrainDerailed ( trainCart, true )
						local cartIndexAttachTo = cartIndex - 1
						if cartIndexAttachTo == 0 then
							detachTrailerFromVehicle ( train, trainCart )
						else
							detachTrailerFromVehicle ( trainCarts[cartIndexAttachTo], trainCart )
						end
						setElementPosition(trainCart, 0, 0, 1000)
					end
				end
				
				--[[
					The function setTrainPosition could be used for the future, but it currently can't be trusted as it places a train an a `random` train track.
					setTrainPosition ( train, ((18107 * progress) + startLocation)  % 18107 )
					Before this can be used, this has to be implemented first: https://wiki.multitheftauto.com/wiki/SetTrainTrack
				]]
				
				setElementPosition(train, trainPositionX, trainPositionY, trainPositionZ, false)
				
			end	
		end
	end
	
	-- Automatic adjusting the dimension, to the current one.
	local localPlayerDimension = getElementDimension(localPlayer)
	if localPlayerDimension ~= getElementDimension(resourceRoot) then
		setElementDimension(resourceRoot, localPlayerDimension)
	end
end


--[[
	Request from the server the train data
]]
addEventHandler("onClientResourceStart",resourceRoot,
function ()
	triggerServerEvent("onClientTrainScriptLoad", localPlayer, resourceRoot)
end)


--[[
	Make sure that the peds inside of the trains do not die, they are not synchronized after all, therefore it is better to keep them indestructible.
]]
addEventHandler("onClientPedDamage",getResourceDynamicElementRoot(resource),
function ()
	cancelEvent()
end)


--[[
	This will make sure you do not get killed by train components which you have attached to the train carts, this doesn't include the train and it's train-carts.
	GTA can be a little bit buggy which can result in dying in the most illogic ways...
]]
addEventHandler ( "onClientPlayerDamage",localPlayer,
function ( attacker, weapon, bodypart ) 
	if attacker and isElement(attacker) and getElementData(attacker,"train-component") then
		cancelEvent() -- stop the damage
	end
end)