Да это было бы идеально но к сожалению формула по которой я нахожу координаты Y больше точек не даёт потому-то с увеличением параметра Х в формуле получается отрицательное число под корнем и она выдаёт ошибку. Поэтому и получаются такие промежутки между верхней и нижней кривой.
import numpy as np
from scipy.interpolate import splprep, splev
import matplotlib.pyplot as plt
pts = np.array([
[ -844171.5868 , 130.0148215 ],
[ -834825.1661 , 574.8615792 ],
[ -825011.4244 , 1006.714268 ],
[ -814706.9956 , 1428.978494 ],
[ -803887.3454 , 1844.16212 ],
[ -792526.7127 , 2254.169102 ],
[ -780598.0483 , 2660.478414 ],
[ -768072.9507 , 3064.258206 ],
[ -754921.5983 , 3466.441321 ],
[ -741112.6782 , 3867.776662 ],
[ -726613.3121 , 4268.864829 ],
[ -711388.9777 , 4670.183148 ],
[ -695403.4266 , 5072.103279 ],
[ -678618.5979 , 5474.903476 ],
[ -660994.5278 , 5878.776843 ],
[ -642489.2542 , 6283.836494 ],
[ -623058.7169 , 6690.118216 ],
[ -602656.6528 , 7097.581013 ],
[ -581234.4854 , 7506.105789 ],
[ -558741.2097 , 7915.492291 ],
[ -535123.2702 , 8325.454348 ],
[ -510324.4337 , 8735.613376 ],
[ -484285.6553 , 9145.490018 ],
[ -456944.9381 , 9554.493743 ],
[ -428237.185 , 9961.910108 ],
[ -398094.0443 , 10366.88531 ],
[ -3.66E+05 , 1.08E+04 ],
[ -333210.9338 , 11165.28426 ],
[ -298316.4805 , 11556.11514 ],
[ -261677.3045 , 11939.25843 ],
[ -223206.1698 , 12312.79017 ],
[ -182811.4782 , 12674.45358 ],
[ -140397.0522 , 13021.59572 ],
[ -95861.90476 , 13351.08734 ],
[ -49100 , 13659.2199 ],
[ 0 , 13941.57105 ],
[ 42610 , 14152.55717 ],
[ 83190.95238 , 14323.99157 ],
[ 121839.4785 , 14460.24555 ],
[ 158647.5985 , 14565.13714 ],
[ 193702.951 , 14642.02227 ],
[ 227089.0009 , 14693.86672 ],
[ 258885.239 , 14723.30371 ],
[ 289167.3705 , 14732.68057 ],
[ 318007.4957 , 14724.09704 ],
[ 345474.2816 , 14699.43709 ],
[ 371633.1253 , 14660.39548 ],
[ 396546.3098 , 14608.50027 ],
[ 420273.1522 , 14545.13195 ],
[ 442870.145 , 14471.5398 ],
[ 464391.0905 , 14388.85606 ],
[ 484887.229 , 14298.10821 ],
[ 504407.361 , 14200.22967 ],
[ 522997.9628 , 14096.06918 ],
[ 540703.2979 , 13986.39906 ],
[ 557565.5218 , 13871.92255 ],
[ 573624.7827 , 13753.28024 ],
[ 588919.3169 , 13631.05588 ],
[ 603485.5399 , 13505.78153 ],
[ 617358.1332 , 13377.94219 ],
[ 630570.1269 , 13247.97991 ],
[ 643152.978 , 13116.29758 ],
[ 655136.6457 , 12983.26227 ],
[ 666549.6625 , 12849.20826 ],
[ 677419.2024 , 12714.43986 ],
[ 687771.1452 , 12579.23388 ],
[ 697630.1383 , 12443.84191 ],
[ 707019.6555 , 12308.49241 ],
[ 715962.0528 , 12173.3926 ],
[ 724478.6218 , 12038.73019 ],
[ 732589.6398 , 11904.67495 ],
[ 740314.4188 , 11771.38021 ],
[ 747671.3513 , 11638.98409 ],
[ 754677.9536 , 11507.61081 ],
[ 761350.9082 , 11377.37177 ],
[ 767706.103 , 11248.36655 ],
[ 773758.6695 , 11120.68391 ],
[ 779523.0186 , 10994.40261 ],
[ 785012.8749 , 10869.59223 ],
[ 790241.3094 , 10746.31392 ],
[ 795220.7709 , 10624.62105 ],
[ 799963.1151 , 10504.55984 ],
[ 804479.6334 , 10386.16997 ],
[ 808781.0795 , 10269.48508 ],
[ 812877.6947 , 10154.53327 ],
[ 816779.2331 , 10041.33758 ],
[ 820494.9839 , 9929.916352 ],
[ 824033.7942 , 9820.283691 ],
[ 827404.0897 , 9712.449775 ],
[ 830613.8949 , 9606.421202 ],
[ 833670.8523 , 9502.201299 ],
[ 836582.2403 , 9399.790404 ],
[ 839354.9908 , 9299.186129 ],
[ 841995.7055 , 9200.383604 ],
[ 844510.6719 , 9103.375702 ],
[ 846905.878 , 9008.153246 ],
[ 849187.0267 , 8914.705202 ],
[ 851359.5492 , 8823.01886 ],
[ 853428.6183 , 8733.079994 ],
[ 855399.1603 , 8644.873018 ],
[ 857275.8669 , 8558.381124 ],
[ 859063.2066 , 8473.586418 ],
[ 860765.4349 , 8390.470032 ],
[ 862386.6046 , 8309.012243 ],
[ 863930.5758 , 8229.19257 ],
[ 865401.0246 , 8150.989873 ],
[ 866801.452 , 8074.382439 ],
[ 868135.1924 , 7999.34806 ],
[ 869405.4213 , 7925.864114 ],
[ 870615.1632 , 7853.907626 ],
[ 871767.2982 , 7783.455339 ],
[ 872864.5698 , 7714.483765 ],
[ 873909.5902 , 7646.969241 ],
[ 874904.8479 , 7580.887981 ],
[ 875852.7122 , 7516.216119 ],
[ 876755.4402 , 7452.929746 ],
[ 877615.1812 , 7391.004956 ],
[ 878433.9821 , 7330.417874 ],
[ 879213.7924 , 7271.144692 ],
[ 879956.469 , 7213.161694 ],
[ 880663.78 , 7156.445285 ],
[ 881337.4095 , 7100.972013 ],
[ 881978.9614 , 7046.718592 ],
[ 882589.9633 , 6993.661922 ],
[ 883171.8698 , 6941.779102 ],
[ 883726.0665 , 6891.047454 ],
[ 884253.8728 , 6841.44453 ],
[ 884756.5456 , 6792.948127 ],
[ 885235.2815 , 6745.536299 ],
[ 885691.2205 , 6699.187367 ],
[ 886125.4481 , 6653.879926 ],
[ 886538.9981 , 6609.592853 ],
[ 886932.8554 , 6566.305317 ],
[ 887307.9575 , 6523.996779 ],
[ 887665.1976 , 6482.647 ],
[ 888005.4263 , 6442.236047 ],
[ 888329.4536 , 6402.744289 ],
[ 888638.0511 , 6364.152407 ],
[ 888931.9534 , 6326.441394 ],
[ 889211.8604 , 6289.59255 ],
[ 889478.4385 , 6253.587494 ],
[ 889732.3223 , 6218.408152 ],
[ 889974.1165 , 6184.036767 ],
[ 890204.3967 , 6150.45589 ],
[ 890423.7111 , 6117.648387 ],
[ 890632.582 , 6085.597429 ],
[ 890831.5067 , 6054.286497 ],
[ 891020.9588 , 6023.699378 ],
[ 891201.3893 , 5993.820161 ],
[ 891373.2279 , 5964.633237 ],
[ 891536.8837 , 5936.123292 ],
[ 891692.7464 , 5908.275311 ],
[ 891841.187 , 5881.074569 ],
[ 891982.5591 , 5854.506629 ],
[ 892117.1991 , 5828.557341 ],
[ 892245.4277 , 5803.212835 ],
[ 892367.5502 , 5778.459521 ],
[ 892483.8574 , 5754.284081 ],
[ 892594.6261 , 5730.673471 ],
[ 892700.1201 , 5707.614911 ],
[ 892800.5905 , 5685.095884 ],
[ 892896.2767 , 5663.104134 ],
[ 892987.4064 , 5641.627658 ],
[ 893074.1965 , 5620.654704 ],
[ 893156.8539 , 5600.173769 ],
[ 893235.5751 , 5580.173589 ],
[ 893310.5477 , 5560.643141 ],
[ 893381.9502 , 5541.571637 ],
[ 893449.9526 , 5522.948519 ],
[ 893514.7167 , 5504.763455 ],
[ 893576.3969 , 5487.006336 ],
[ 893635.1399 , 5469.667271 ],
[ 893691.0856 , 5452.736584 ],
[ 893744.3673 , 5436.204808 ],
[ 893795.1117 , 5420.062685 ],
[ 893843.4397 , 5404.301157 ],
[ 893889.4664 , 5388.911367 ],
[ 893933.3013 , 5373.884651 ],
[ 893975.0489 , 5359.212536 ],
[ 894014.8084 , 5344.886738 ],
[ 894052.6747 , 5330.899156 ],
[ 894088.7378 , 5317.241868 ],
[ 894123.0836 , 5303.907129 ],
[ 894155.7939 , 5290.887367 ],
[ 894186.9466 , 5278.175178 ],
[ 894216.6158 , 5265.763325 ],
[ 894244.8722 , 5253.644733 ],
[ 894271.7831 , 5241.812485 ],
[ 894297.4124 , 5230.25982 ],
[ 894321.8214 , 5218.98013 ],
[ 894345.068 , 5207.966956 ],
[ 894367.2076 , 5197.213983 ],
[ 894388.2929 , 5186.715042 ],
[ 894408.3742 , 5176.4641 ],
[ 894427.4993 , 5166.455264 ],
[ 894445.7136 , 5156.682773 ],
[ 894463.0606 , 5147.140996 ],
[ 894479.5815 , 5137.824431 ],
[ 894495.3157 , 5128.727702 ],
[ 894510.3007 , 5119.845554 ],
[ 894524.5721 , 5111.172851 ],
[ 894538.1639 , 5102.704575 ],
[ 894551.1084 , 5094.435823 ],
[ 894563.4366 , 5086.361802 ],
[ 894575.1777 , 5078.477829 ],
[ 894586.3597 , 5070.779327 ],
[ 894597.0093 , 5063.261826 ],
[ 894607.1517 , 5055.920953 ],
[ 894616.8111 , 5048.75244 ],
[ 894626.0106 , 5041.752112 ],
[ 894634.772 , 5034.915891 ],
[ 894643.1162 , 5028.239792 ],
[ 894651.063 , 5021.719918 ],
[ 894658.6315 , 5015.352464 ],
[ 894665.8395 , 5009.133709 ],
[ 894672.7043 , 5003.060018 ],
[ 894679.2422 , 4997.127835 ],
[ 894685.4687 , 4991.333688 ],
[ 894691.3988 , 4985.674181 ],
[ 894697.0465 , 4980.145995 ],
[ 894702.4252 , 4974.745887 ],
[ 894707.5478 , 4969.470683 ],
[ 894712.4265 , 4964.317284 ],
[ 894717.0729 , 4959.282657 ],
[ 894721.498 , 4954.363838 ],
[ 894725.7123 , 4949.557927 ],
[ 894729.726 , 4944.862089 ],
[ 894733.5486 , 4940.273551 ],
[ 894737.1891 , 4935.789601 ],
[ 894740.6563 , 4931.407583 ],
[ 894743.9584 , 4927.124902 ],
[ 894747.1032 , 4922.939016 ],
[ 894750.0983 , 4918.847438 ],
[ 894752.9508 , 4914.847733 ],
[ 894755.6674 , 4910.937516 ],
[ 894758.2547 , 4907.114452 ],
[ 894760.7187 , 4903.376255 ],
[ 894763.0655 , 4899.720683 ],
[ 894765.3005 , 4896.145538 ],
[ 894767.429 , 4892.648668 ],
[ 894769.4562 , 4889.22796 ],
[ 894771.3869 , 4885.88134 ],
[ 894773.2256 , 4882.606774 ],
[ 894774.9767 , 4879.402263 ],
[ 894776.6445 , 4876.265845 ],
[ 894778.2329 , 4873.195587 ],
[ 894779.7456 , 4870.189591 ],
[ 894781.1863 , 4867.245987 ],
[ 894782.5584 , 4864.362931 ],
[ 894783.8651 , 4861.538607 ],
[ 894785.1096 , 4858.771219 ],
[ 894786.2949 , 4856.058996 ],
[ 894787.4237 , 4853.400182 ],
[ 894788.4988 , 4850.79304 ],
[ 894789.5226 , 4848.235843 ],
[ 894790.4977 , 4845.726876 ],
[ 894791.4264 , 4843.264432 ],
[ 894792.3109 , 4840.846806 ],
[ 894793.1532 , 4838.472293 ],
[ 894793.9554 , 4836.139181 ],
[ 894794.7195 , 4833.845749 ],
[ 894795.4471 , 4831.590262 ],
[ 894796.1401 , 4829.370958 ],
[ 894796.8001 , 4827.18605 ],
[ 894797.4287 , 4825.033707 ],
[ 894798.0273 , 4822.912053 ],
[ 894798.5974 , 4820.81915 ],
[ 894799.1404 , 4818.752983 ],
[ 894799.6575 , 4816.711446 ],
[ 894800.15 , 4814.69232 ],
[ 894800.6191 , 4812.693247 ],
[ 894801.0658 , 4810.7117 ],
[ 894801.4912 , 4808.74494 ],
[ 894801.8964 , 4806.789974 ],
[ 894802.2823 , 4804.843485 ],
[ 894802.6498 , 4802.901751 ],
[ 894802.9998 , 4800.960538 ],
[ 894803.3332 , 4799.01495 ],
[ 894803.6506 , 4797.059228 ],
[ 894803.953 , 4795.086461 ],
[ 894804.2409 , 4793.088172 ],
[ 894804.5152 , 4791.053685 ],
[ 894804.7764 , 4788.969152 ],
[ 894805.0251 , 4786.815922 ],
[ 894805.262 , 4784.567707 ],
[ 846905.878 , 4.47584112 ],
[ 844510.6719 , -67.43955138 ],
[ 841995.7055 , -142.3070924 ],
[ 839354.9908 , -220.2266185 ],
[ 836582.2403 , -301.2999633 ],
[ 833670.8523 , -385.6309178 ],
[ 830613.8949 , -473.3251852 ],
[ 827404.0897 , -564.4903307 ],
[ 824033.7942 , -659.2357237 ],
[ 820494.9839 , -757.6724744 ],
[ 816779.2331 , -859.9133629 ],
[ 812877.6947 , -966.0727594 ],
[ 808781.0795 , -1076.266537 ],
[ 804479.6334 , -1190.611971 ],
[ 799963.1151 , -1309.227636 ],
[ 795220.7709 , -1432.233278 ],
[ 790241.3094 , -1559.749682 ],
[ 785012.8749 , -1691.898522 ],
[ 779523.0186 , -1828.802196 ],
[ 773758.6695 , -1970.583631 ],
[ 767706.103 , -2117.366079 ],
[ 761350.9082 , -2269.272883 ],
[ 754677.9536 , -2426.427208 ],
[ 747671.3513 , -2588.951751 ],
[ 740314.4188 , -2756.968407 ],
[ 732589.6398 , -2930.597897 ],
[ 7.24E+05 , -3109.959347 ],
[ 715962.0528 , -3295.169818 ],
[ 707019.6555 , -3486.343777 ],
[ 697630.1383 , -3683.592492 ],
[ 687771.1452 , -3887.023364 ],
[ 677419.2024 , -4096.739164 ],
[ 666549.6625 , -4312.837174 ],
[ 655136.6457 , -4535.40822 ],
[ 643152.978 , -4764.535577 ],
[ 630570.1269 , -5000.29373 ],
[ 617358.1332 , -5242.746979 ],
[ 603485.5399 , -5491.947852 ],
[ 588919.3169 , -5747.935309 ],
[ 573624.7827 , -6010.732709 ],
[ 557565.5218 , -6280.345492 ],
[ 540703.2979 , -6556.758548 ],
[ 522997.9628 , -6839.93322 ],
[ 504407.361 , -7129.803871 ],
[ 484887.229 , -7426.273975 ],
[ 464391.0905 , -7729.211616 ],
[ 442870.145 , -8038.44432 ],
[ 420273.1522 , -8353.753101 ],
[ 396546.3098 , -8674.865557 ],
[ 371633.1253 , -9001.447865 ],
[ 345474.2816 , -9333.095436 ],
[ 318007.4957 , -9669.32198 ],
[ 289167.3705 , -10009.54661 ],
[ 258885.239 , -10353.07861 ],
[ 227089.0009 , -10699.09921 ],
[ 193702.951 , -11046.63982 ],
[ 158647.5985 , -11394.55563 ],
[ 121839.4785 , -11741.49341 ],
[ 83190.95238 , -12085.85185 ],
[ 42610 , -12425.73216 ],
[ 0 , -12758.87574 ],
[ -49100 , -13112.69561 ],
[ -95861.90476 , -13419.62538 ],
[ -140397.0522 , -13684.40157 ],
[ -182811.4782 , -13911.17231 ],
[ -223206.1698 , -14103.59538 ],
[ -261677.3045 , -14264.91491 ],
[ -298316.4805 , -14398.02242 ],
[ -333210.9338 , -14505.50616 ],
[ -366443.7465 , -14589.69133 ],
[ -398094.0443 , -14652.67342 ],
[ -428237.185 , -14696.34603 ],
[ -456944.9381 , -14722.42432 ],
[ -484285.6553 , -14732.46491 ],
[ -510324.4337 , -14727.88297 ],
[ -535123.2702 , -14709.96689 ],
[ -558741.2097 , -14679.89104 ],
[ -581234.4854 , -14638.72691 ],
[ -602656.6528 , -14587.45277 ],
[ -623058.7169 , -14526.96229 ],
[ -642489.2542 , -14458.07206 ],
[ -660994.5278 , -14381.5283 ],
[ -678618.5979 , -14298.0128 ],
[ -695403.4266 , -14208.14818 ],
[ -711388.9777 , -14112.50266 ],
[ -726613.3121 , -14011.59421 ],
[ -741112.6782 , -13905.89431 ],
[ -754921.5983 , -13795.83135 ],
[ -768072.9507 , -13681.79351 ],
[ -780598.0483 , -13564.13147 ],
[ -792526.7127 , -13443.1607 ],
[ -803887.3454 , -13319.1635 ],
[ -814706.9956 , -13192.39071 ],
[ -825011.4244 , -13063.06321 ],
[ -834825.1661 , -1.29E+04 ],
[ -844171.5868 , -12797.48478 ],
[ -853072.9398 , -12661.53517 ],
[ -861550.4188 , -12523.63451 ],
[ -869624.2084 , -12383.86607 ],
[ -877313.5318 , -12242.28581 ],
[ -884636.697 , -12098.92157 ],
[ -891611.14 , -11953.77161 ],
[ -898253.4666 , -11806.80262 ],
[ -904579.492 , -11657.94681 ],
[ -910604.2781 , -11507.09797 ],
[ -916342.1697 , -11354.10615 ],
[ -921806.8282 , -11198.77043 ],
[ -927011.265 , -11040.82913 ],
[ -931967.8714 , -10879.94639 ],
[ -936688.449 , -10715.6936 ],
[ -941184.2371 , -10547.523 ],
[ -945465.9401 , -10374.72948 ],
[ -949543.7525 , -10196.39358 ],
[ -953427.3833 , -10011.29318 ],
[ -957126.0794 , -9817.760331 ],
[ -960648.647 , -9613.435582 ],
[ -964003.4733 , -9394.813356 ],
[ -967198.546 , -9156.311169 ],
[ -970241.4724 , -8888.065137 ],
[ -973139.4975 , -8569.343378 ],
[ -975899.5215 , -8137.250486 ]])
tck, u = splprep(pts.T, u=None, s=0, per=1)
u_new = np.linspace(u.min(), u.max(), 1000)
x_new, y_new = splev(u_new, tck, der=0)
plt.plot(pts[:,0], pts[:,1], 'ro')
plt.plot(x_new, y_new, 'b--')
plt.show()