n_p=%v

n_p=%v

t

n

n_p=%v

n_s = 1 (slider from 1 to 3, step 1)
dy = 1
dx: 100
xmin = -235.24567922184886
xmax = 1154.292958930069
xscale: xmax - xmin
threshold: 0.02
threshold_x: (threshold * xscale)
ymax = 8.94269405466806
ymin = -2.2341760766183874
yscale: ymax - ymin
threshold_y: (threshold * yscale)
np3 = 1 (slider from 1 to 20, step 1)
P310_sub = (684.4128046182987, 4.917583267838216)
P310 = DynamicCoordinates(P310_sub, Min[xmax, Max[xmin, If[abs(x(P310_sub) - (round(x(P310_sub) / dx) * dx))  <  threshold_x, (round(x(P310_sub) / dx) * dx), x(P310_sub)]]], Min[ymax, Max[ymin, If[abs(y(P310_sub) - (round(y(P310_sub) / dy) * dy))  <  threshold_y, (round(y(P310_sub) / dy) * dy), y(P310_sub)]]])
P39_sub = (639.1836988556691, 4.594136865325101)
P39 = DynamicCoordinates(P39_sub, Min[xmax, Max[xmin, If[abs(x(P39_sub) - (round(x(P39_sub) / dx) * dx))  <  threshold_x, (round(x(P39_sub) / dx) * dx), x(P39_sub)]]], Min[ymax, Max[ymin, If[abs(y(P39_sub) - (round(y(P39_sub) / dy) * dy))  <  threshold_y, (round(y(P39_sub) / dy) * dy), y(P39_sub)]]])
P38_sub = (199.45628171898602, 4.090998016971373)
P38 = DynamicCoordinates(P38_sub, Min[xmax, Max[xmin, If[abs(x(P38_sub) - (round(x(P38_sub) / dx) * dx))  <  threshold_x, (round(x(P38_sub) / dx) * dx), x(P38_sub)]]], Min[ymax, Max[ymin, If[abs(y(P38_sub) - (round(y(P38_sub) / dy) * dy))  <  threshold_y, (round(y(P38_sub) / dy) * dy), y(P38_sub)]]])
P37_sub = (573.8527683096471, 5.6722915403688114)
P37 = DynamicCoordinates(P37_sub, Min[xmax, Max[xmin, If[abs(x(P37_sub) - (round(x(P37_sub) / dx) * dx))  <  threshold_x, (round(x(P37_sub) / dx) * dx), x(P37_sub)]]], Min[ymax, Max[ymin, If[abs(y(P37_sub) - (round(y(P37_sub) / dy) * dy))  <  threshold_y, (round(y(P37_sub) / dy) * dy), y(P37_sub)]]])
P36_sub = (41.15441154978033, 2.97690485275954)
P36 = DynamicCoordinates(P36_sub, Min[xmax, Max[xmin, If[abs(x(P36_sub) - (round(x(P36_sub) / dx) * dx))  <  threshold_x, (round(x(P36_sub) / dx) * dx), x(P36_sub)]]], Min[ymax, Max[ymin, If[abs(y(P36_sub) - (round(y(P36_sub) / dy) * dy))  <  threshold_y, (round(y(P36_sub) / dy) * dy), y(P36_sub)]]])
P35_sub = (342.6817833006483, 4.126936506139496)
P35 = DynamicCoordinates(P35_sub, Min[xmax, Max[xmin, If[abs(x(P35_sub) - (round(x(P35_sub) / dx) * dx))  <  threshold_x, (round(x(P35_sub) / dx) * dx), x(P35_sub)]]], Min[ymax, Max[ymin, If[abs(y(P35_sub) - (round(y(P35_sub) / dy) * dy))  <  threshold_y, (round(y(P35_sub) / dy) * dy), y(P35_sub)]]])
P34_sub = (551.2382154283326, 4.953521757006337)
P34 = DynamicCoordinates(P34_sub, Min[xmax, Max[xmin, If[abs(x(P34_sub) - (round(x(P34_sub) / dx) * dx))  <  threshold_x, (round(x(P34_sub) / dx) * dx), x(P34_sub)]]], Min[ymax, Max[ymin, If[abs(y(P34_sub) - (round(y(P34_sub) / dy) * dy))  <  threshold_y, (round(y(P34_sub) / dy) * dy), y(P34_sub)]]])
P33_sub = (-6.587422310773769, 2.042504134388326)
P33 = DynamicCoordinates(P33_sub, Min[xmax, Max[xmin, If[abs(x(P33_sub) - (round(x(P33_sub) / dx) * dx))  <  threshold_x, (round(x(P33_sub) / dx) * dx), x(P33_sub)]]], Min[ymax, Max[ymin, If[abs(y(P33_sub) - (round(y(P33_sub) / dy) * dy))  <  threshold_y, (round(y(P33_sub) / dy) * dy), y(P33_sub)]]])
P32_sub = (850.252859081276, 5.6722915403688114)
P32 = DynamicCoordinates(P32_sub, Min[xmax, Max[xmin, If[abs(x(P32_sub) - (round(x(P32_sub) / dx) * dx))  <  threshold_x, (round(x(P32_sub) / dx) * dx), x(P32_sub)]]], Min[ymax, Max[ymin, If[abs(y(P32_sub) - (round(y(P32_sub) / dy) * dy))  <  threshold_y, (round(y(P32_sub) / dy) * dy), y(P32_sub)]]])
P31_sub = (134.12535117296463, 2.97690485275954)
P31 = DynamicCoordinates(P31_sub, Min[xmax, Max[xmin, If[abs(x(P31_sub) - (round(x(P31_sub) / dx) * dx))  <  threshold_x, (round(x(P31_sub) / dx) * dx), x(P31_sub)]]], Min[ymax, Max[ymin, If[abs(y(P31_sub) - (round(y(P31_sub) / dy) * dy))  <  threshold_y, (round(y(P31_sub) / dy) * dy), y(P31_sub)]]])
P311_sub = (968.3510796837004, 5.097275713678832)
P311 = DynamicCoordinates(P311_sub, Min[xmax, Max[xmin, If[abs(x(P311_sub) - (round(x(P311_sub) / dx) * dx))  <  threshold_x, (round(x(P311_sub) / dx) * dx), x(P311_sub)]]], Min[ymax, Max[ymin, If[abs(y(P311_sub) - (round(y(P311_sub) / dy) * dy))  <  threshold_y, (round(y(P311_sub) / dy) * dy), y(P311_sub)]]])
P312_sub = (478.3691005885394, 1.1081034160171097)
P312 = DynamicCoordinates(P312_sub, Min[xmax, Max[xmin, If[abs(x(P312_sub) - (round(x(P312_sub) / dx) * dx))  <  threshold_x, (round(x(P312_sub) / dx) * dx), x(P312_sub)]]], Min[ymax, Max[ymin, If[abs(y(P312_sub) - (round(y(P312_sub) / dy) * dy))  <  threshold_y, (round(y(P312_sub) / dy) * dy), y(P312_sub)]]])
P313_sub = (769.8455599477121, 1.5393652860345932)
P313 = DynamicCoordinates(P313_sub, Min[xmax, Max[xmin, If[abs(x(P313_sub) - (round(x(P313_sub) / dx) * dx))  <  threshold_x, (round(x(P313_sub) / dx) * dx), x(P313_sub)]]], Min[ymax, Max[ymin, If[abs(y(P313_sub) - (round(y(P313_sub) / dy) * dy))  <  threshold_y, (round(y(P313_sub) / dy) * dy), y(P313_sub)]]])
P314_sub = (704.5146294016906, 0.8565339918402443)
P314 = DynamicCoordinates(P314_sub, Min[xmax, Max[xmin, If[abs(x(P314_sub) - (round(x(P314_sub) / dx) * dx))  <  threshold_x, (round(x(P314_sub) / dx) * dx), x(P314_sub)]]], Min[ymax, Max[ymin, If[abs(y(P314_sub) - (round(y(P314_sub) / dy) * dy))  <  threshold_y, (round(y(P314_sub) / dy) * dy), y(P314_sub)]]])
P315_sub = (390.42361716120286, 6.103553410386294)
P315 = DynamicCoordinates(P315_sub, Min[xmax, Max[xmin, If[abs(x(P315_sub) - (round(x(P315_sub) / dx) * dx))  <  threshold_x, (round(x(P315_sub) / dx) * dx), x(P315_sub)]]], Min[ymax, Max[ymin, If[abs(y(P315_sub) - (round(y(P315_sub) / dy) * dy))  <  threshold_y, (round(y(P315_sub) / dy) * dy), y(P315_sub)]]])
P316_sub = (933.1728863127657, 2.869089385255167)
P316 = DynamicCoordinates(P316_sub, Min[xmax, Max[xmin, If[abs(x(P316_sub) - (round(x(P316_sub) / dx) * dx))  <  threshold_x, (round(x(P316_sub) / dx) * dx), x(P316_sub)]]], Min[ymax, Max[ymin, If[abs(y(P316_sub) - (round(y(P316_sub) / dy) * dy))  <  threshold_y, (round(y(P316_sub) / dy) * dy), y(P316_sub)]]])
P317_sub = (684.4128046182994, 3.084720320263909)
P317 = DynamicCoordinates(P317_sub, Min[xmax, Max[xmin, If[abs(x(P317_sub) - (round(x(P317_sub) / dx) * dx))  <  threshold_x, (round(x(P317_sub) / dx) * dx), x(P317_sub)]]], Min[ymax, Max[ymin, If[abs(y(P317_sub) - (round(y(P317_sub) / dy) * dy))  <  threshold_y, (round(y(P317_sub) / dy) * dy), y(P317_sub)]]])
P318_sub = (591.441864995115, 2.473766004405807)
P318 = DynamicCoordinates(P318_sub, Min[xmax, Max[xmin, If[abs(x(P318_sub) - (round(x(P318_sub) / dx) * dx))  <  threshold_x, (round(x(P318_sub) / dx) * dx), x(P318_sub)]]], Min[ymax, Max[ymin, If[abs(y(P318_sub) - (round(y(P318_sub) / dy) * dy))  <  threshold_y, (round(y(P318_sub) / dy) * dy), y(P318_sub)]]])
P319_sub = (541.187303036637, 1.2159188835214805)
P319 = DynamicCoordinates(P319_sub, Min[xmax, Max[xmin, If[abs(x(P319_sub) - (round(x(P319_sub) / dx) * dx))  <  threshold_x, (round(x(P319_sub) / dx) * dx), x(P319_sub)]]], Min[ymax, Max[ymin, If[abs(y(P319_sub) - (round(y(P319_sub) / dy) * dy))  <  threshold_y, (round(y(P319_sub) / dy) * dy), y(P319_sub)]]])
P320_sub = (274.8381246567033, 1.5034267968664694)
P320 = DynamicCoordinates(P320_sub, Min[xmax, Max[xmin, If[abs(x(P320_sub) - (round(x(P320_sub) / dx) * dx))  <  threshold_x, (round(x(P320_sub) / dx) * dx), x(P320_sub)]]], Min[ymax, Max[ymin, If[abs(y(P320_sub) - (round(y(P320_sub) / dy) * dy))  <  threshold_y, (round(y(P320_sub) / dy) * dy), y(P320_sub)]]])
P220_sub = (229.60901889407296, 5.744168518705057)
P219_sub = (511.03456586154977, 2.1862580910608185)
P218_sub = (317.5545023214095, 2.150319601892695)
P217_sub = (357.75815188819183, 4.917583267838213)
P216_sub = (621.5946021702014, 4.522259886988854)
P215_sub = (588.9291368971907, 7.541092977111238)
P214_sub = (764.8201037518637, 0.9284109701764915)
P213_sub = (915.5837896272978, 2.869089385255167)
P212_sub = (948.2492549003085, 5.097275713678832)
P211_sub = (61.25623633317162, 4.198813484475742)
P210_sub = (222.07083460030137, 2.4378275152376836)
P29_sub = (119.04898258542114, 0.46121061099088423)
P28_sub = (131.61262307504063, 0.7846570135039967)
P27_sub = (420.5763543362897, 7.3254620421024965)
P26_sub = (392.9363452591262, 3.6597361469538856)
P25_sub = (264.7872122650074, 3.8753670819626307)
P24_sub = (96.43442970410612, 2.8331508960870457)
P23_sub = (506.0091096657018, 4.95352175700634)
P22_sub = (742.2055508705483, 6.175430388722543)
P21_sub = (-21.663790898317156, 2.222196580228942)
P220 = DynamicCoordinates(P220_sub, Min[xmax, Max[xmin, If[abs(x(P220_sub) - (round(x(P220_sub) / dx) * dx))  <  threshold_x, (round(x(P220_sub) / dx) * dx), x(P220_sub)]]], Min[ymax, Max[ymin, If[abs(y(P220_sub) - (round(y(P220_sub) / dy) * dy))  <  threshold_y, (round(y(P220_sub) / dy) * dy), y(P220_sub)]]])
P219 = DynamicCoordinates(P219_sub, Min[xmax, Max[xmin, If[abs(x(P219_sub) - (round(x(P219_sub) / dx) * dx))  <  threshold_x, (round(x(P219_sub) / dx) * dx), x(P219_sub)]]], Min[ymax, Max[ymin, If[abs(y(P219_sub) - (round(y(P219_sub) / dy) * dy))  <  threshold_y, (round(y(P219_sub) / dy) * dy), y(P219_sub)]]])
P218 = DynamicCoordinates(P218_sub, Min[xmax, Max[xmin, If[abs(x(P218_sub) - (round(x(P218_sub) / dx) * dx))  <  threshold_x, (round(x(P218_sub) / dx) * dx), x(P218_sub)]]], Min[ymax, Max[ymin, If[abs(y(P218_sub) - (round(y(P218_sub) / dy) * dy))  <  threshold_y, (round(y(P218_sub) / dy) * dy), y(P218_sub)]]])
P217 = DynamicCoordinates(P217_sub, Min[xmax, Max[xmin, If[abs(x(P217_sub) - (round(x(P217_sub) / dx) * dx))  <  threshold_x, (round(x(P217_sub) / dx) * dx), x(P217_sub)]]], Min[ymax, Max[ymin, If[abs(y(P217_sub) - (round(y(P217_sub) / dy) * dy))  <  threshold_y, (round(y(P217_sub) / dy) * dy), y(P217_sub)]]])
P216 = DynamicCoordinates(P216_sub, Min[xmax, Max[xmin, If[abs(x(P216_sub) - (round(x(P216_sub) / dx) * dx))  <  threshold_x, (round(x(P216_sub) / dx) * dx), x(P216_sub)]]], Min[ymax, Max[ymin, If[abs(y(P216_sub) - (round(y(P216_sub) / dy) * dy))  <  threshold_y, (round(y(P216_sub) / dy) * dy), y(P216_sub)]]])
P215 = DynamicCoordinates(P215_sub, Min[xmax, Max[xmin, If[abs(x(P215_sub) - (round(x(P215_sub) / dx) * dx))  <  threshold_x, (round(x(P215_sub) / dx) * dx), x(P215_sub)]]], Min[ymax, Max[ymin, If[abs(y(P215_sub) - (round(y(P215_sub) / dy) * dy))  <  threshold_y, (round(y(P215_sub) / dy) * dy), y(P215_sub)]]])
P214 = DynamicCoordinates(P214_sub, Min[xmax, Max[xmin, If[abs(x(P214_sub) - (round(x(P214_sub) / dx) * dx))  <  threshold_x, (round(x(P214_sub) / dx) * dx), x(P214_sub)]]], Min[ymax, Max[ymin, If[abs(y(P214_sub) - (round(y(P214_sub) / dy) * dy))  <  threshold_y, (round(y(P214_sub) / dy) * dy), y(P214_sub)]]])
P213 = DynamicCoordinates(P213_sub, Min[xmax, Max[xmin, If[abs(x(P213_sub) - (round(x(P213_sub) / dx) * dx))  <  threshold_x, (round(x(P213_sub) / dx) * dx), x(P213_sub)]]], Min[ymax, Max[ymin, If[abs(y(P213_sub) - (round(y(P213_sub) / dy) * dy))  <  threshold_y, (round(y(P213_sub) / dy) * dy), y(P213_sub)]]])
P212 = DynamicCoordinates(P212_sub, Min[xmax, Max[xmin, If[abs(x(P212_sub) - (round(x(P212_sub) / dx) * dx))  <  threshold_x, (round(x(P212_sub) / dx) * dx), x(P212_sub)]]], Min[ymax, Max[ymin, If[abs(y(P212_sub) - (round(y(P212_sub) / dy) * dy))  <  threshold_y, (round(y(P212_sub) / dy) * dy), y(P212_sub)]]])
P211 = DynamicCoordinates(P211_sub, Min[xmax, Max[xmin, If[abs(x(P211_sub) - (round(x(P211_sub) / dx) * dx))  <  threshold_x, (round(x(P211_sub) / dx) * dx), x(P211_sub)]]], Min[ymax, Max[ymin, If[abs(y(P211_sub) - (round(y(P211_sub) / dy) * dy))  <  threshold_y, (round(y(P211_sub) / dy) * dy), y(P211_sub)]]])
P210 = DynamicCoordinates(P210_sub, Min[xmax, Max[xmin, If[abs(x(P210_sub) - (round(x(P210_sub) / dx) * dx))  <  threshold_x, (round(x(P210_sub) / dx) * dx), x(P210_sub)]]], Min[ymax, Max[ymin, If[abs(y(P210_sub) - (round(y(P210_sub) / dy) * dy))  <  threshold_y, (round(y(P210_sub) / dy) * dy), y(P210_sub)]]])
P29 = DynamicCoordinates(P29_sub, Min[xmax, Max[xmin, If[abs(x(P29_sub) - (round(x(P29_sub) / dx) * dx))  <  threshold_x, (round(x(P29_sub) / dx) * dx), x(P29_sub)]]], Min[ymax, Max[ymin, If[abs(y(P29_sub) - (round(y(P29_sub) / dy) * dy))  <  threshold_y, (round(y(P29_sub) / dy) * dy), y(P29_sub)]]])
P28 = DynamicCoordinates(P28_sub, Min[xmax, Max[xmin, If[abs(x(P28_sub) - (round(x(P28_sub) / dx) * dx))  <  threshold_x, (round(x(P28_sub) / dx) * dx), x(P28_sub)]]], Min[ymax, Max[ymin, If[abs(y(P28_sub) - (round(y(P28_sub) / dy) * dy))  <  threshold_y, (round(y(P28_sub) / dy) * dy), y(P28_sub)]]])
P27 = DynamicCoordinates(P27_sub, Min[xmax, Max[xmin, If[abs(x(P27_sub) - (round(x(P27_sub) / dx) * dx))  <  threshold_x, (round(x(P27_sub) / dx) * dx), x(P27_sub)]]], Min[ymax, Max[ymin, If[abs(y(P27_sub) - (round(y(P27_sub) / dy) * dy))  <  threshold_y, (round(y(P27_sub) / dy) * dy), y(P27_sub)]]])
P26 = DynamicCoordinates(P26_sub, Min[xmax, Max[xmin, If[abs(x(P26_sub) - (round(x(P26_sub) / dx) * dx))  <  threshold_x, (round(x(P26_sub) / dx) * dx), x(P26_sub)]]], Min[ymax, Max[ymin, If[abs(y(P26_sub) - (round(y(P26_sub) / dy) * dy))  <  threshold_y, (round(y(P26_sub) / dy) * dy), y(P26_sub)]]])
P25 = DynamicCoordinates(P25_sub, Min[xmax, Max[xmin, If[abs(x(P25_sub) - (round(x(P25_sub) / dx) * dx))  <  threshold_x, (round(x(P25_sub) / dx) * dx), x(P25_sub)]]], Min[ymax, Max[ymin, If[abs(y(P25_sub) - (round(y(P25_sub) / dy) * dy))  <  threshold_y, (round(y(P25_sub) / dy) * dy), y(P25_sub)]]])
P24 = DynamicCoordinates(P24_sub, Min[xmax, Max[xmin, If[abs(x(P24_sub) - (round(x(P24_sub) / dx) * dx))  <  threshold_x, (round(x(P24_sub) / dx) * dx), x(P24_sub)]]], Min[ymax, Max[ymin, If[abs(y(P24_sub) - (round(y(P24_sub) / dy) * dy))  <  threshold_y, (round(y(P24_sub) / dy) * dy), y(P24_sub)]]])
P23 = DynamicCoordinates(P23_sub, Min[xmax, Max[xmin, If[abs(x(P23_sub) - (round(x(P23_sub) / dx) * dx))  <  threshold_x, (round(x(P23_sub) / dx) * dx), x(P23_sub)]]], Min[ymax, Max[ymin, If[abs(y(P23_sub) - (round(y(P23_sub) / dy) * dy))  <  threshold_y, (round(y(P23_sub) / dy) * dy), y(P23_sub)]]])
P22 = DynamicCoordinates(P22_sub, Min[xmax, Max[xmin, If[abs(x(P22_sub) - (round(x(P22_sub) / dx) * dx))  <  threshold_x, (round(x(P22_sub) / dx) * dx), x(P22_sub)]]], Min[ymax, Max[ymin, If[abs(y(P22_sub) - (round(y(P22_sub) / dy) * dy))  <  threshold_y, (round(y(P22_sub) / dy) * dy), y(P22_sub)]]])
P21 = DynamicCoordinates(P21_sub, Min[xmax, Max[xmin, If[abs(x(P21_sub) - (round(x(P21_sub) / dx) * dx))  <  threshold_x, (round(x(P21_sub) / dx) * dx), x(P21_sub)]]], Min[ymax, Max[ymin, If[abs(y(P21_sub) - (round(y(P21_sub) / dy) * dy))  <  threshold_y, (round(y(P21_sub) / dy) * dy), y(P21_sub)]]])
np1 = 1 (slider from 1 to 20, step 1)
P120_sub = (322.57995851725724, 6.355122834563159)
P119_sub = (214.53265030652955, 4.414444419484483)
P118_sub = (111.51079829164964, 1.359672840193975)
P117_sub = (249.71084367746417, 1.3956113293620986)
P116_sub = (5.976218178845803, 1.2877958618577277)
P115_sub = (639.1836988556687, 1.8987501777158293)
P114_sub = (777.3837442414832, 3.7675516144582577)
P113_sub = (408.01271384666984, 5.27696815951945)
P112_sub = (516.0600220573976, 2.0425041343883237)
P111_sub = (556.26367162418, 1.2159188835214805)
P110_sub = (46.179867745628066, 2.0425041343883232)
P19_sub = (925.6347020189934, 6.283245856226912)
P18_sub = (347.707239496496, 0.9284109701764912)
P17_sub = (259.7617560691595, 1.9346886668839522)
P11_sub = (380.372704769507, 3.551920679449516)
P12_sub = (206.9944660127577, 3.0487818310957873)
P13_sub = (686.9255327162226, 5.995737942881925)
P14_sub = (458.26727580514773, 3.947244060298878)
P15_sub = (747.2310070663962, 7.03795412875751)
P16_sub = (588.9291368971905, 4.845706289501969)
P120 = DynamicCoordinates(P120_sub, Min[xmax, Max[xmin, If[abs(x(P120_sub) - (round(x(P120_sub) / dx) * dx))  <  threshold_x, (round(x(P120_sub) / dx) * dx), x(P120_sub)]]], Min[ymax, Max[ymin, If[abs(y(P120_sub) - (round(y(P120_sub) / dy) * dy))  <  threshold_y, (round(y(P120_sub) / dy) * dy), y(P120_sub)]]])
P119 = DynamicCoordinates(P119_sub, Min[xmax, Max[xmin, If[abs(x(P119_sub) - (round(x(P119_sub) / dx) * dx))  <  threshold_x, (round(x(P119_sub) / dx) * dx), x(P119_sub)]]], Min[ymax, Max[ymin, If[abs(y(P119_sub) - (round(y(P119_sub) / dy) * dy))  <  threshold_y, (round(y(P119_sub) / dy) * dy), y(P119_sub)]]])
P118 = DynamicCoordinates(P118_sub, Min[xmax, Max[xmin, If[abs(x(P118_sub) - (round(x(P118_sub) / dx) * dx))  <  threshold_x, (round(x(P118_sub) / dx) * dx), x(P118_sub)]]], Min[ymax, Max[ymin, If[abs(y(P118_sub) - (round(y(P118_sub) / dy) * dy))  <  threshold_y, (round(y(P118_sub) / dy) * dy), y(P118_sub)]]])
P117 = DynamicCoordinates(P117_sub, Min[xmax, Max[xmin, If[abs(x(P117_sub) - (round(x(P117_sub) / dx) * dx))  <  threshold_x, (round(x(P117_sub) / dx) * dx), x(P117_sub)]]], Min[ymax, Max[ymin, If[abs(y(P117_sub) - (round(y(P117_sub) / dy) * dy))  <  threshold_y, (round(y(P117_sub) / dy) * dy), y(P117_sub)]]])
P116 = DynamicCoordinates(P116_sub, Min[xmax, Max[xmin, If[abs(x(P116_sub) - (round(x(P116_sub) / dx) * dx))  <  threshold_x, (round(x(P116_sub) / dx) * dx), x(P116_sub)]]], Min[ymax, Max[ymin, If[abs(y(P116_sub) - (round(y(P116_sub) / dy) * dy))  <  threshold_y, (round(y(P116_sub) / dy) * dy), y(P116_sub)]]])
P115 = DynamicCoordinates(P115_sub, Min[xmax, Max[xmin, If[abs(x(P115_sub) - (round(x(P115_sub) / dx) * dx))  <  threshold_x, (round(x(P115_sub) / dx) * dx), x(P115_sub)]]], Min[ymax, Max[ymin, If[abs(y(P115_sub) - (round(y(P115_sub) / dy) * dy))  <  threshold_y, (round(y(P115_sub) / dy) * dy), y(P115_sub)]]])
P114 = DynamicCoordinates(P114_sub, Min[xmax, Max[xmin, If[abs(x(P114_sub) - (round(x(P114_sub) / dx) * dx))  <  threshold_x, (round(x(P114_sub) / dx) * dx), x(P114_sub)]]], Min[ymax, Max[ymin, If[abs(y(P114_sub) - (round(y(P114_sub) / dy) * dy))  <  threshold_y, (round(y(P114_sub) / dy) * dy), y(P114_sub)]]])
P113 = DynamicCoordinates(P113_sub, Min[xmax, Max[xmin, If[abs(x(P113_sub) - (round(x(P113_sub) / dx) * dx))  <  threshold_x, (round(x(P113_sub) / dx) * dx), x(P113_sub)]]], Min[ymax, Max[ymin, If[abs(y(P113_sub) - (round(y(P113_sub) / dy) * dy))  <  threshold_y, (round(y(P113_sub) / dy) * dy), y(P113_sub)]]])
P112 = DynamicCoordinates(P112_sub, Min[xmax, Max[xmin, If[abs(x(P112_sub) - (round(x(P112_sub) / dx) * dx))  <  threshold_x, (round(x(P112_sub) / dx) * dx), x(P112_sub)]]], Min[ymax, Max[ymin, If[abs(y(P112_sub) - (round(y(P112_sub) / dy) * dy))  <  threshold_y, (round(y(P112_sub) / dy) * dy), y(P112_sub)]]])
P111 = DynamicCoordinates(P111_sub, Min[xmax, Max[xmin, If[abs(x(P111_sub) - (round(x(P111_sub) / dx) * dx))  <  threshold_x, (round(x(P111_sub) / dx) * dx), x(P111_sub)]]], Min[ymax, Max[ymin, If[abs(y(P111_sub) - (round(y(P111_sub) / dy) * dy))  <  threshold_y, (round(y(P111_sub) / dy) * dy), y(P111_sub)]]])
P110 = DynamicCoordinates(P110_sub, Min[xmax, Max[xmin, If[abs(x(P110_sub) - (round(x(P110_sub) / dx) * dx))  <  threshold_x, (round(x(P110_sub) / dx) * dx), x(P110_sub)]]], Min[ymax, Max[ymin, If[abs(y(P110_sub) - (round(y(P110_sub) / dy) * dy))  <  threshold_y, (round(y(P110_sub) / dy) * dy), y(P110_sub)]]])
P19 = DynamicCoordinates(P19_sub, Min[xmax, Max[xmin, If[abs(x(P19_sub) - (round(x(P19_sub) / dx) * dx))  <  threshold_x, (round(x(P19_sub) / dx) * dx), x(P19_sub)]]], Min[ymax, Max[ymin, If[abs(y(P19_sub) - (round(y(P19_sub) / dy) * dy))  <  threshold_y, (round(y(P19_sub) / dy) * dy), y(P19_sub)]]])
P18 = DynamicCoordinates(P18_sub, Min[xmax, Max[xmin, If[abs(x(P18_sub) - (round(x(P18_sub) / dx) * dx))  <  threshold_x, (round(x(P18_sub) / dx) * dx), x(P18_sub)]]], Min[ymax, Max[ymin, If[abs(y(P18_sub) - (round(y(P18_sub) / dy) * dy))  <  threshold_y, (round(y(P18_sub) / dy) * dy), y(P18_sub)]]])
P17 = DynamicCoordinates(P17_sub, Min[xmax, Max[xmin, If[abs(x(P17_sub) - (round(x(P17_sub) / dx) * dx))  <  threshold_x, (round(x(P17_sub) / dx) * dx), x(P17_sub)]]], Min[ymax, Max[ymin, If[abs(y(P17_sub) - (round(y(P17_sub) / dy) * dy))  <  threshold_y, (round(y(P17_sub) / dy) * dy), y(P17_sub)]]])
P15 = DynamicCoordinates(P15_sub, Min[xmax, Max[xmin, If[abs(x(P15_sub) - (round(x(P15_sub) / dx) * dx))  <  threshold_x, (round(x(P15_sub) / dx) * dx), x(P15_sub)]]], Min[ymax, Max[ymin, If[abs(y(P15_sub) - (round(y(P15_sub) / dy) * dy))  <  threshold_y, (round(y(P15_sub) / dy) * dy), y(P15_sub)]]])
P14 = DynamicCoordinates(P14_sub, Min[xmax, Max[xmin, If[abs(x(P14_sub) - (round(x(P14_sub) / dx) * dx))  <  threshold_x, (round(x(P14_sub) / dx) * dx), x(P14_sub)]]], Min[ymax, Max[ymin, If[abs(y(P14_sub) - (round(y(P14_sub) / dy) * dy))  <  threshold_y, (round(y(P14_sub) / dy) * dy), y(P14_sub)]]])
P13 = DynamicCoordinates(P13_sub, Min[xmax, Max[xmin, If[abs(x(P13_sub) - (round(x(P13_sub) / dx) * dx))  <  threshold_x, (round(x(P13_sub) / dx) * dx), x(P13_sub)]]], Min[ymax, Max[ymin, If[abs(y(P13_sub) - (round(y(P13_sub) / dy) * dy))  <  threshold_y, (round(y(P13_sub) / dy) * dy), y(P13_sub)]]])
P12 = DynamicCoordinates(P12_sub, Min[xmax, Max[xmin, If[abs(x(P12_sub) - (round(x(P12_sub) / dx) * dx))  <  threshold_x, (round(x(P12_sub) / dx) * dx), x(P12_sub)]]], Min[ymax, Max[ymin, If[abs(y(P12_sub) - (round(y(P12_sub) / dy) * dy))  <  threshold_y, (round(y(P12_sub) / dy) * dy), y(P12_sub)]]])
P11 = DynamicCoordinates(P11_sub, Min[xmax, Max[xmin, If[abs(x(P11_sub) - (round(x(P11_sub) / dx) * dx))  <  threshold_x, (round(x(P11_sub) / dx) * dx), x(P11_sub)]]], Min[ymax, Max[ymin, If[abs(y(P11_sub) - (round(y(P11_sub) / dy) * dy))  <  threshold_y, (round(y(P11_sub) / dy) * dy), y(P11_sub)]]])
P3s = Sort(First[{P31, P32, P33, P34, P35, P36, P37, P38, P39, P310, P311, P312, P313, P314, P315, P316, P317, P318, P319, P320}, If[n_s ≥ 3, np3]])
P16 = DynamicCoordinates(P16_sub, Min[xmax, Max[xmin, If[abs(x(P16_sub) - (round(x(P16_sub) / dx) * dx))  <  threshold_x, (round(x(P16_sub) / dx) * dx), x(P16_sub)]]], Min[ymax, Max[ymin, If[abs(y(P16_sub) - (round(y(P16_sub) / dy) * dy))  <  threshold_y, (round(y(P16_sub) / dy) * dy), y(P16_sub)]]])
P1s = Sort(First[{P11, P12, P13, P14, P15, P16, P17, P18, P19, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120}, np1])
y1f: y(Element[P1s, np1])
jumpDownValid: true
jumpUpValid: true
LL = Corner(1)
UR = Corner(3)
xlabeldisplayed: "" + (LaTeX[xlabel]) + ""
P1mids = Append(Sequence[(x(Element[P1s, i + 1]), y(Element[P1s, i])), i, 1, np1 - 1], (xmax, y1f))
ylabeldisplayed: "" + (LaTeX[ylabel]) + ""
P1tot = Join(Sequence[{Element[P1s, i], Element[P1mids, i]}, i, 1, np1])
f1 = PolyLine(P1tot)
hlines = Sequence(Segment[(xmin, (i * dy)), (xmax, (i * dy))], i, ceil(ymin / dy), ymax / dy)
heights1: y(P1s)
jumpsizes1sub = Sequence(Element[heights1, i + 1] - Element[heights1, i], i, 1, np1 - 1)
jumpinds1 = RemoveUndefined(Sequence[If[Element[jumpsizes1sub, i] ≠ 0, i], i, 1, np1 - 1])
nJumps1 = Length(jumpinds1)
jumpsizes1 = Sequence(Element[jumpsizes1sub, Element[jumpinds1, i]], i, 1, nJumps1)
validJumpSizes = RemoveUndefined({If[jumpUpValid, dy], If[jumpDownValid, (-dy)]})
validJumps1 = Zip(Defined[IndexOf[a, validJumpSizes]], a, jumpsizes1)
P10 = Element(P1s, 1)
t10: x(P10)
y10: y(P10)
nValidJumps1 = Sum(validJumps1)
allJumpsValid1: nValidJumps1 ≟ nJumps1
jumptimes1: x(Sequence[Element[P1s, Element[jumpinds1, i] + 1], i, 1, nJumps1])
np2 = 1 (slider from 1 to 20, step 1)
P2s = Sort(First[{P21, P22, P23, P24, P25, P26, P27, P28, P29, P210, P211, P212, P213, P214, P215, P216, P217, P218, P219, P220}, If[n_s ≥ 2, np2, 0]])
P20 = Element(P2s, 1)
t20: x(P20)
y20: y(P20)
y2f: y(Element[P2s, np2])
P2mids = Append(Sequence[(x(Element[P2s, i + 1]), y(Element[P2s, i])), i, 1, np2 - 1], (xmax, y2f))
P2tot = Join(Sequence[{Element[P2s, i], Element[P2mids, i]}, i, 1, np2])
f2 = PolyLine(P2tot)
heights2: y(P2s)
jumpsizes2sub = Sequence(Element[heights2, i + 1] - Element[heights2, i], i, 1, np2 - 1)
jumpinds2 = RemoveUndefined(Sequence[If[Element[jumpsizes2sub, i] ≠ 0, i], i, 1, np2 - 1])
nJumps2 = Length(jumpinds2)
jumpsizes2 = Sequence(Element[jumpsizes2sub, Element[jumpinds2, i]], i, 1, nJumps2)
jumptimes2: x(Sequence[Element[P2s, Element[jumpinds2, i] + 1], i, 1, nJumps2])
validJumps2 = Zip(Defined[IndexOf[a, validJumpSizes]], a, jumpsizes2)
nValidJumps2 = Sum(validJumps2)
allJumpsValid2: nValidJumps2 ≟ nJumps2
P30 = Element(P3s, 1)
t30: x(P30)
y30: y(P30)
y3f: y(Element[P3s, np3])
P3mids = Append(Sequence[(x(Element[P3s, i + 1]), y(Element[P3s, i])), i, 1, np3 - 1], (xmax, y3f))
P3tot = Join(Sequence[{Element[P3s, i], Element[P3mids, i]}, i, 1, np3])
heights3: y(P3s)
jumpsizes3sub = Sequence(Element[heights3, i + 1] - Element[heights3, i], i, 1, np3 - 1)
jumpinds3 = RemoveUndefined(Sequence[If[Element[jumpsizes3sub, i] ≠ 0, i], i, 1, np3 - 1])
nJumps3 = Length(jumpinds3)
jumpsizes3 = Sequence(Element[jumpsizes3sub, Element[jumpinds3, i]], i, 1, nJumps3)
jumptimes3: x(Sequence[Element[P3s, Element[jumpinds3, i] + 1], i, 1, nJumps3])
validJumps3 = Zip(Defined[IndexOf[a, validJumpSizes]], a, jumpsizes3)
nValidJumps3 = Sum(validJumps3)
allJumpsValid3: nValidJumps3 ≟ nJumps3
f3 = PolyLine(P3tot)
fractionValidJumps1 = If(nJumps1 ≟ 0, 1, nValidJumps1 / nJumps1)
fractionValidJumps2 = If(nJumps2 ≟ 0, 1, nValidJumps2 / nJumps2)
fractionValidJumps3 = If(nJumps3 ≟ 0, 1, nValidJumps3 / nJumps3)
yfs = First({y1f, y2f, y3f}, n_s)