Taco-Related Mountain Navigation Challenge 2013

We start by reloading the landscape itself and making a background plot.

AppendTo[$Path,NotebookDirectory[]]
<<TerrainPackage`

If all has gone well, we now have functions z[x,y] and GradZ[x,y]. Let’s check

z[10.1,12.1]
GradZ[10.1,12.1]

So far, so good! Let’s go and and plot the landscape in various ways to make sure we understand it.

CPlot = ContourPlot[z[x,y],{x,0,25},{y,0,25},Contours->15,PlotPoints->40,ColorFunction->(Lighter[ColorData["LightTerrain"][#+0.2],0.2] &),ImageSize->600,Epilog->{{Disk[{9.57,10.23},0.1],Disk[{20.12,22.3},0.1]},Text[Style["El Chato",FontFamily->"Helvetica",FontSize->14],{9.57,10.75}],
Text[Style["Treasure",FontFamily->"Helvetica",FontSize->14],{20.12,22.9}]}]

Student Solutions:

GreatMazingerSolution[t_]:={
InterpolatingFunction[{{0.,1.}},{4,7,0,{12},{4},0,0,0,0,Automatic},{{0.,0.09090909090909091,0.18181818181818182,0.2727272727272727,0.36363636363636365,0.45454545454545453,0.5454545454545454,0.6363636363636364,0.7272727272727273,0.8181818181818182,0.9090909090909091,1.}},{Developer`PackedArrayForm,{0,1,2,3,4,5,6,7,8,9,10,11,12},{9.57,12.653756640869519,13.578269392965606,14.000702697220317,14.128840988362276,14.145479101022895,14.232551129272702,14.409438684240397,14.549071635864953,14.914427170378048,16.499321109638288,20.12}},{Automatic}][t],
InterpolatingFunction[{{0.,1.}},{4,7,0,{12},{4},0,0,0,0,Automatic},{{0.,0.09090909090909091,0.18181818181818182,0.2727272727272727,0.36363636363636365,0.45454545454545453,0.5454545454545454,0.6363636363636364,0.7272727272727273,0.8181818181818182,0.9090909090909091,1.}},{Developer`PackedArrayForm,{0,1,2,3,4,5,6,7,8,9,10,11,12},{10.23,13.772138168620659,15.07243307698861,15.507384484777008,15.682969457851543,15.724195400735844,15.847722155976287,16.120954266522926,16.41373407005934,16.870037987420478,18.528770686442236,22.3}},{Automatic}][t]
}

HawaiianMonkeySolution[t_]:=Module[
{t0,n0,xtT,ytT,i,xlist,ylist,xf,yf},
t0=Table[i/(11),{i,0,11,1}];

xlist=Prepend[Append[{9.951226844537004,10.648792378436584,11.67769818166311,13.005197769925324,13.171097771365323,13.413445261239005,13.956708033293191,15.821864929461158,17.217003020980126,18.85140257462529},20.12],9.57];
ylist=Prepend[Append[{11.15870730759221,11.63825116392833,12.732005895214863,14.880426015315297,15.31045041656505,15.762979306901663,17.15655716227615,17.790993793012134,19.719894252509057,20.714339512197256},22.3],10.23];

xtT=Transpose[{t0,xlist}];
ytT=Transpose[{t0,ylist}];
xf:=Interpolation[xtT];
yf:=Interpolation[ytT];
Return[{xf[t],yf[t]}]
]

SWBSolution[t_]:={9.57*(1-t)^4+59.9876*(1-t)^3*t+79.15379999999999*(1-t)^2*t^2+75.8224*(1-t)*t^3+20.12*t^4,10.23*(1-t)^4+63.69*(1-t)^3*t+94.7478*(1-t)^2*t^2+83.952*(1-t)*t^3+22.3*t^4};

AllIWantForChristmasIsAnASolution[t_]:={InterpolatingFunction[{{0.,1.}},{4,7,0,{12},{2},0,0,0,0,Automatic},{{0.,0.09090909090909091,0.18181818181818182,0.2727272727272727,0.36363636363636365,0.45454545454545453,0.5454545454545454,0.6363636363636364,0.7272727272727273,0.8181818181818182,0.9090909090909091,1.}},{Developer`PackedArrayForm,{0,1,2,3,4,5,6,7,8,9,10,11,12},{9.57,10.154565506750323,10.90411357387605,12.558745169567334,13.196464298844367,14.088117795147802,14.495487310381515,15.592290874068132,16.47201784882952,18.17076998528422,19.14841646745102,20.12}},{Automatic}][t],InterpolatingFunction[{{0.,1.}},{4,7,0,{12},{2},0,0,0,0,Automatic},{{0.,0.09090909090909091,0.18181818181818182,0.2727272727272727,0.36363636363636365,0.45454545454545453,0.5454545454545454,0.6363636363636364,0.7272727272727273,0.8181818181818182,0.9090909090909091,1.}},{Developer`PackedArrayForm,{0,1,2,3,4,5,6,7,8,9,10,11,12},{10.23,10.896213584093012,11.48804485488652,13.459756385795068,14.126101145090033,15.05367158697849,15.514611078080229,16.67449738772491,17.70402029093681,19.74165100218988,20.91761700651817,22.3}},{Automatic}][t]}

FinallyTheSolution[w_]:={InterpolatingFunction[{{0., 1.}}, {4, 7, 0, {12}, {12}, 0, 0, 0, 0, Automatic}, 
  {{0., 0.09090909090909091, 0.18181818181818182, 0.2727272727272727, 0.36363636363636365, 0.45454545454545453, 
   0.5454545454545454, 0.6363636363636364, 0.7272727272727273, 0.8181818181818182, 0.9090909090909091, 1.}}, 
  {Developer`PackedArrayForm, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}, {9.57, 11.621550565398003, 12.026097109081578, 
   12.157278660048904, 12.48283222344715, 12.898339173898798, 13.07004179315256, 13.100812478177792, 13.151386453935114, 
   13.53454409147309, 14.329674537437636, 20.12}}, {Automatic}][w],InterpolatingFunction[{{0.,1.}},{4,7,0,{12},{12},0,0,0,0,Automatic},{{0.,0.09090909090909091,0.18181818181818182,0.2727272727272727,0.36363636363636365,0.45454545454545453,0.5454545454545454,0.6363636363636364,0.7272727272727273,0.8181818181818182,0.9090909090909091,1.}},{Developer`PackedArrayForm,{0,1,2,3,4,5,6,7,8,9,10,11,12},{10.23,12.440981754552347,13.176661950625657,13.332532226648354,13.442935454647008,13.65759000284318,13.758891711030707,13.811007668470824,13.919905205978056,14.527919820948473,15.644687101903152,22.3}},{Automatic}][w]}

GellSolution[t_] := Module[{xPoly, yPoly,ConstructPolynomial,ConstructPolynomialSD,LatPoly,LongPoly},
	ConstructPolynomial[list_, x_] := Sum[list[[i]]*x^i,{i, 1, Length[list]}];
	ConstructPolynomialSD[list_, x_, param_, start_, dest_] := (dest - ConstructPolynomial[list,param] - start)x^(Length[list+1]) +ConstructPolynomial[list, x] + start;
	LatPoly[list_,x_] :=  ConstructPolynomialSD[list, x, 1,9.57,20.12];
	LongPoly[list_, x_] := ConstructPolynomialSD[list, x, 1, 10.23,22.3];
	{LongPoly[{2.961922873764834`,4.329401216282207`,0.5321221923244757`,-4.875792630469444`,3.250253075968118`},t], LatPoly[{3.825031679056977`,1.3209826788334738`,6.6725921296745625`,-2.588495371817352`,7.732103421763995`},t]}
];

CodenameSolution[t_]:=
Module[{b,xvalues1,yvalues1,xt1,yt1,xInterp,yInterp,xi1,yi1},

b={0,1/11,2/11,3/11,4/11,5/11,6/11,7/11,8/11,9/11,10/11,1};

xvalues1 = {9.57,10.395905007383854`,10.934532159811667`,11.160205446328893`,11.789319644361623`,12.667570206727545`,13.730078652429206`,14.227076186899676`,14.70263730923387`,15.875485080993165`,18.376410205651297`,20.12};
yvalues1 = {10.23,10.915921783477874`,11.301993226429419`,11.578054298701474`,12.203851829633921`,13.092362192195976`,14.086806768244182`,14.627194553849966`,15.086951624510743`,16.56452327607848`,19.92201635926941`,22.3};



xt1=Transpose[{b,xvalues1}];
     yt1=Transpose[{b,yvalues1}];

xInterp=Interpolation[xt1];
yInterp=Interpolation[yt1];

xi1=xInterp;
     yi1=yInterp;

Return[{xi1[t],yi1[t]}]


]

HohmanSolution[t_]:={InterpolatingFunction[{{0.,1.}},{4,7,0,{12},{4},0,0,0,0,Automatic},{{0.,0.09090909090909091,0.18181818181818182,0.2727272727272727,0.36363636363636365,0.45454545454545453,0.5454545454545454,0.6363636363636364,0.7272727272727273,0.8181818181818182,0.9090909090909091,1.}},{Developer`PackedArrayForm,{0,1,2,3,4,5,6,7,8,9,10,11,12},{9.57,9.765298508912858,10.038778250892602,11.851247956231683,13.049979244570519,14.047638465829337,15.268351468415487,17.3628256403138,18.4663667535196,19.701984178258122,19.97112540758011,20.12}},{Automatic}][t],InterpolatingFunction[{{0.,1.}},{4,7,0,{12},{4},0,0,0,0,Automatic},{{0.,0.09090909090909091,0.18181818181818182,0.2727272727272727,0.36363636363636365,0.45454545454545453,0.5454545454545454,0.6363636363636364,0.7272727272727273,0.8181818181818182,0.9090909090909091,1.}},{Developer`PackedArrayForm,{0,1,2,3,4,5,6,7,8,9,10,11,12},{10.23,10.459707902303833,10.766162624042115,12.804412418360629,14.184423569115054,15.398411982441534,16.986049705752052,19.04502136259681,20.370144403933214,21.813441618788186,22.12520217917548,22.3}},{Automatic}][t]}

aBeautifulSolution[T_]:=Module[{F,L},

L={12.211264874267172`,12.908705358626607`,14.655605932457194`,15.444566446739929`,15.442173444055333`,16.220214265863287`,15.836410168305937`,16.66945909741239`,16.159682310999848`,16.980427434129783`,16.434222167013544`,17.389463738938627`,17.04110322324339`,18.03745937256487`,18.056186014168297`,19.132663661305198`,18.71125736794472`,20.239419551064376`,19.2902530190306`,21.22717751315118`};
F= Module[{n,Lsplit,Ltrans,Lxt,Lyt,t,x,y},
n=Length[L]/2;
t =Table[i/(n+1),{i,0,n+1}];
Lsplit= Prepend[Append[Partition[L,2],{20.12,22.3}],{9.57,10.23}];
Ltrans=Transpose[Lsplit];
Lxt=Transpose[{t,Ltrans[[1]]}];
Lyt=Transpose[{t,Ltrans[[2]]}];
{x=Interpolation[Lxt],y=Interpolation[Lyt]}
];

{F[[1]][T],F[[2]][T]}];

WorldWideHustlerAKA2ChainzAKABigEasy[t_]:=Module[{ListOfCoords,A,B,MyPath},
A={9.57,10.23};
B={20.12,22.3};
ListOfCoords= {A,{10.66688911482313,11.572518642015508},{11.266959791048137,12.51147816678893},{11.858509829868323,13.249953179040883},{12.86432215182597,14.394139929913274},{13.286295432804632,14.80956144122131},{13.460536027913248,14.922252338935602},{13.530476372630433,15.044465344217985},{13.642276097133779,15.106082836219679},{13.87281034137535,15.328834358006},{13.95065797234553,15.45111815226193},{14.016956200935565,15.537598734737852},{14.040187282156976,15.593519604826135},{14.14090683492009,15.703202300729528},{14.244330544053591,15.874607526531044},{14.423260468219864,16.038005040167477},{14.66106352011363,16.329832927496884},{14.944226824211711,16.71040962627443},{15.25048683506023,17.143953742233972},{16.418369169861503,18.444290411508447},{17.475102586322063,19.545395794622447},B};
MyPath={
Interpolation[Partition[Riffle[Table[i/(Length[ListOfCoords[[All,1]]]-1),{i,0,Length[ListOfCoords[[All,1]]]}],ListOfCoords[[All,1]]],2]][t],
Interpolation[Partition[Riffle[Table[i/(Length[ListOfCoords[[All,2]]]-1),{i,0,Length[ListOfCoords[[All,2]]]}],ListOfCoords[[All,2]]],2]][t]
}
]

TacoMasterSolution[t_]:=Module[{pol1,pol2,pol3,pol4,poly1,poly2,poly3,poly4,a1,a2,a3,a4,b1,b2,b3,b4,x,y},
pol1 ={{0,9.57},{1.0/16.0,10.541599186034802`},{1.0/8.0,11.291755720465265`},{3.0/16.0,11.687314958866198`},{1.0/4.0,12.5951`}};
pol2 ={{1.0/4.0,12.5951`},{5.0/16.0,13.43316904280897`},{6.0/16.0,14.0797734139088`},{7.0/16.0,14.961344180569782`},{1.0/2.0,16.6841`}};
pol3 = {{1.0/2.0,16.6841`},{9.0/16,16.812381983076495`},{10.0/16.0,16.9481405214285`},{11.0/16.0,17.03979195529692`},{12.0/16.0,17.5621`}};
pol4 ={{12.0/16.0,17.5621`},{13.0/16.0,18.690819669039072`},{14.0/16.0,19.162819966475244`},{15.0/16.0,19.352537253680836`},{1,20.12}};
poly1={{0,10.23},{1.0/16.0,11.290738343469434`},{1.0/8.0,12.176600162658133`},{3.0/16.0,12.636140446731`},{1.0/4.0,13.6548`}};
poly2 ={{3.0/16.0,12.636140446731`},{1.0/4.0,13.6548`},{5.0/16.0,14.698297722058035`},{6.0/16.0,15.483842888211546`},{7.0/16.0,16.43437271849587`},{1.0/2.0,18.683`}};
poly3={{1.0/2.0,18.683`},{9/16,18.848349166945074`},{10.0/16.0,18.996138611520543`},{11.0/16.0,19.13127278034156`},{12.0/16.0,19.8003`}};
poly4={{12.0/16.0,19.8003`},{13.0/16.0,20.82882070854705`},{14.0/16.0,21.301257791709872`},{15.0/16.0,21.500647197914564`},{1,22.3}};
a1:=Interpolation[pol1];
a2:=Interpolation[pol2];
a3:=Interpolation[pol3];
a4:=Interpolation[pol4];
b1:=Interpolation[poly1];
b2:=Interpolation[poly2];
b3:=Interpolation[poly3];
b4:=Interpolation[poly4];
x[h_]:=If[h<=.25,a1[h],If[.25<h≤.5,a2[h],If[.5≤h≤.75,a3[h],If[.75h≤1,a4[h]]]]];
y[h_]:=If[h<=.25,b1[h],If[.25<h≤.5,b2[h],If[.5≤h≤.75,b3[h],If[.75h≤1,b4[h]]]]];
{If[t<=.25,a1[t],If[.25<t≤.5,a2[t],If[.5≤t≤.75,a3[t],If[.75t≤1,a4[t]]]]],If[t<=.25,b1[t],If[.25<t≤.5,b2[t],If[.5≤t≤.75,b3[t],If[.75t≤1,b4[t]]]]]}
]

PointsSet:=(*{{13.4028169609509`,13.779761272133724`},{14.469208254009658`,14.70177777104211`},{15.212642717659072`,15.335411239628469`},{15.413946548233657`,15.575126251867276`},{15.605124279714891`,15.7666123066744`},{15.688728558610698`,15.854018270474315`},{15.853836482494986`,15.953834205952884`},{15.933708555345977`,16.084453502001956`},{16.055951368022093`,16.244932002753973`},{16.727177918278805`,17.293791675928585`}};*)

(*{{16.629835496479934`,18.37539775040153`},{19.18993705664886`,21.17521238564356`}};*)

{{11.604494657699295`,12.607963395760862`},{13.062616604012296`,14.31807528304266`},{16.18894794429653`,17.841745517364334`}}

(*{{14.0247,15.3266},{15.0535,16.5036},{17.6942,19.5247}}*)

PHHMSolution[t_]:=Module[
{PointsSet={{11.604494657699295`,12.607963395760862`},{13.062616604012296`,14.31807528304266`},{16.18894794429653`,17.841745517364334`}},
xSet={{0,9.57}},ySet={{0,10.23}},i=1,length,point,xpoint,ypoint,xt,yt
},
length=Length[PointsSet];

While[i<=length,point=PointsSet[[i]];
xpoint={i/(length+1),point[[1]]};
ypoint={i/(length+1),point[[2]]};
xSet=Append[xSet,xpoint];
ySet=Append[ySet,ypoint];
i++];
xSet=Append[xSet,{1,20.12}];
ySet=Append[ySet,{1,22.3}];
xt=Interpolation[xSet];yt=Interpolation[ySet];
{xt[t],yt[t]}
]

NotYourSolution[t_]:=Module[{f,T,L},
L= {{12.796496032687928`,14.312837595753331`},{13.625213816466214`,15.213469401993832`},{14.849434939325455`,16.556878761042384`},{15.250125354095092`,17.15261025382148`},{16.366642138073157`,18.417801740370646`},{16.63997501943084`,18.76477749168909`},{17.997094810030863`,20.262444742078515`},{18.174526702464412`,20.461619666065353`},{18.54655625177863`,20.78092257196565`},{19.32096339283635`,21.541534402252985`}};
f=Module[{n,i,tnx,tny,t0x,t0y,t1x,t1y,tx,ty,xInt,yInt},
n=Length[L];
T[i_]:=i/(n+1);
tnx=Table[{T[i], L[[i,1]]},{i,1,n}];
tny=Table[{T[i], L[[i,2]]},{i,1,n}];
t0x = {0, 9.57};
t0y = {0,10.23};
t1x= {1,20.12};
t1y = {1,22.3};
tx = Append[Prepend[tnx,t0x],t1x];
ty= Append[Prepend[tny,t0y],t1y];
xInt= Interpolation[tx];
yInt= Interpolation[ty];
List[xInt,yInt]
];
List[f[[1]][t],f[[2]][t]]
]

TastyTacoSolution[t_]:={InterpolatingFunction[{{0., 1.}}, {4, 7, 0, {12}, {4}, 0, 0, 0, 0, Automatic}, {{0., 0.09090909090909091, 0.18181818181818182, 
   0.2727272727272727, 0.36363636363636365, 0.45454545454545453, 0.5454545454545454, 0.6363636363636364, 0.7272727272727273, 
   0.8181818181818182, 0.9090909090909091, 1.}}, {Developer`PackedArrayForm, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}, {9.57, 1., 3., 5., 
   7., 9., 1., 3., 5., 7., 9., 20.12}}, {Automatic}][t],
InterpolatingFunction[{{0., 1.}}, {4, 7, 0, {12}, {4}, 0, 0, 0, 0, Automatic}, {{0., 0.09090909090909091, 0.18181818181818182, 
   0.2727272727272727, 0.36363636363636365, 0.45454545454545453, 0.5454545454545454, 0.6363636363636364, 0.7272727272727273, 
   0.8181818181818182, 0.9090909090909091, 1.}}, {Developer`PackedArrayForm, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}, {10.23, 2., 4., 6., 
   8., 0., 2., 4., 6., 8., 0., 22.3}}, {Automatic}][t]}

TryMyBest[t_]:=Module[{i,xtable,ytable,xt,yt},

i=Table[j,{j,0,1,1/11}];

xtable=Transpose[{i,
{9.57,9.57,10.256054370319958,10.774849920858985,
11.807266949479997,12.84631020470913,12.928135930471477,14.08020129705506,
15.008822246015349,17.049911720217274,19.135216655627097,20.12}}];
ytable =Transpose[{i,{10.23,10.989928340934613,11.650900105474372,13.099462580708366,
14.647264293318843,15.221870197532649,15.48451992080652,16.750858583814377,
17.570189099375902,19.500881816387555,21.396412870751814,22.3}}];

xt:=Interpolation[xtable];
yt:=Interpolation[ytable];

Return[{xt[t],yt[t]}]
]

PathMini[t_]:=Module[{fX,fY},
fX:=Interpolation[{{0,9.57},{1/11,12.3704},{2/11,12.7823},{3/11,12.9686},{4/11,13.2008},{5/11,13.1327},{6/11,13.4066},{7/11,13.9465},{8/11,16.0688},{9/11,18.9795},{10/11,19.2261},{1,20.12}}];
fY:=Interpolation[{{0,10.23},{1/11,11.7611},{2/11,12.5715},{3/11,14.3875},{4/11,15.0593},{5/11,15.2275},{6/11,15.0379},{7/11,15.3531},{8/11,16.0062},{9/11,18.9015},{10/11,19.4202},{1,22.3}}];
{fX[t],fY[t]}
];

SolutionsList = {GreatMazingerSolution,HawaiianMonkeySolution,SWBSolution,AllIWantForChristmasIsAnASolution,FinallyTheSolution,GellSolution,CodenameSolution,HohmanSolution,aBeautifulSolution,WorldWideHustlerAKA2ChainzAKABigEasy,TacoMasterSolution,PHHMSolution,NotYourSolution,TastyTacoSolution,TryMyBest,PathMini};

ToString /@ SolutionsList

SolutionGraphics = Show[ParametricPlot[Tooltip[#[t],ToString[#]],{t,0,1},Axes->None,PlotStyle->{Thick,Blue},PlotRange->{{0,25},{0,25}}] & /@ SolutionsList];

Show[CPlot,SolutionGraphics]

Official Scoring.

Since a lot of these paths are not differentiable, we have to compute length the old-fashioned way:

PathLength[f_,Path_] := Module[{Pts,SpacePts,SpaceEdges},
Pts = Path /@ Range[0,1,0.001];
SpacePts = {#[[1]],#[[2]],f[#[[1]],#[[2]]]} & /@ Pts;
SpaceEdges = (SpacePts - RotateRight[SpacePts])[[2;;]];
Total[Norm /@ SpaceEdges]
];

SolutionScores ={ToString[#],PathLength[z,#]} & /@ SolutionsList

Sort[SolutionScores,#1[[2]] < #2[[2]] &] // TableForm

Ok, did I actually do better?

InstructorSolution[t_] := Module[{sol,Solution,PathFunction,Sol,Vars,n,Points,γ,LongSASol},

Sol = {16.340466910627192`,{x1->10.620503826627484`,y1->11.313539262092313`,x2->11.286361159506763`,y2->11.992152414710015`,x3->13.007758965199603`,y3->14.021176927561392`,x4->15.281192401394764`,y4->16.609896999439623`,x5->16.430809761446493`,y5->17.831447370570675`}};

LongSASol = {16.854082885761663`,{x1->9.625828240652673`,y1->10.417473454646672`,x2->9.667063084750122`,y2->10.680450706756071`,x3->9.665177048582855`,y3->10.764685364808717`,x4->9.687829607732585`,y4->10.868328430854103`,x5->9.692596564524544`,y5->10.945225291627048`,x6->9.703769671400744`,y6->10.991780855203048`,x7->9.747432263246976`,y7->11.140536084282722`,x8->9.759856789130515`,y8->11.177296235811019`,x9->9.777984639104947`,y9->11.249872601292891`,x10->9.768186783219816`,y10->11.300182897341134`,x11->9.76358219772571`,y11->11.38925841298366`,x12->9.770667609379874`,y12->11.485810644643914`,x13->9.796586271207214`,y13->11.656052972679412`,x14->9.845236057396262`,y14->11.767541320852747`,x15->9.877164074695573`,y15->11.915726557828027`,x16->9.92931582121598`,y16->12.106337851821422`,x17->9.98225628705648`,y17->12.23368886542739`,x18->10.088952470189902`,y18->12.372233971371333`,x19->10.181722731356572`,y19->12.504887220137656`,x20->10.260688137773629`,y20->12.63732266140134`,x21->10.356118495697512`,y21->12.791494740073261`,x22->10.368388170122246`,y22->12.847829001159011`,x23->10.423032430429261`,y23->12.88623207219203`,x24->10.437040602767299`,y24->12.97266243390815`,x25->10.470485182250371`,y25->13.067118201829155`,x26->10.603144433357405`,y26->13.215513969421806`,x27->10.643409269186725`,y27->13.248433759274377`,x28->10.643032331731357`,y28->13.254266274865744`,x29->10.661968985369706`,y29->13.299724098984285`,x30->10.84426805465367`,y30->13.453793535237974`,x31->10.89752610256596`,y31->13.517868824156693`,x32->10.96480660325899`,y32->13.57900931491072`,x33->10.980171998349878`,y33->13.57376985857335`,x34->10.986505662299606`,y34->13.584778703528444`,x35->11.006424796926826`,y35->13.609831729096603`,x36->11.015418440923016`,y36->13.62910768546854`,x37->11.036978339064667`,y37->13.67693823949964`,x38->11.117090803265619`,y38->13.71600953385222`,x39->11.125107861940434`,y39->13.72319797272263`,x40->11.255258973712634`,y40->13.81908869284822`,x41->11.28956242560226`,y41->13.871911887543122`,x42->11.34672173257365`,y42->13.914719022759654`,x43->11.401987306439363`,y43->13.94064499965686`,x44->11.46296727182298`,y44->13.990780644156827`,x45->11.550473751654156`,y45->14.055729508975073`,x46->11.668990855736292`,y46->14.16137062798129`,x47->11.874946076714869`,y47->14.355880626652622`,x48->12.595800643140546`,y48->14.991755975929284`,x49->14.906560710383218`,y49->17.140955885813863`,x50->16.847441830202737`,y50->19.076838800686385`}};

Vars[nVectors_] := "{" <> StringJoin[Riffle[Table["{" <> Riffle[# <> ToString[i] &  /@ {"x","y"},","] <> "}",{i,1,nVectors}],","]] <> "}";

n = Length[LongSASol[[2]]]/2;
Points = ToExpression[Vars[n]] /.LongSASol[[2]];

PathFunction[Start_,Points_,End_] :=  Module[{AllPoints,tVals,Distances},
AllPoints =Join[{Start},Points,{End}];
Distances = (Norm /@ (AllPoints - RotateRight[AllPoints]))[[2;;]];
tVals =Join[{0},Accumulate[Distances]/ Total[Distances]];
AllPoints = Transpose[AllPoints];
Interpolation[#,InterpolationOrder->1]& /@ (Transpose[{tVals,#}]& /@ AllPoints)
];

γ= PathFunction[{9.57,10.23},Points,{20.12,22.3}];

{γ[[1]][t],γ[[2]][t]}

];

InstructorSolution[0.2]

PathLength[z,InstructorSolution]

Show[CPlot,ParametricPlot[InstructorSolution[t],{t,0,1}]]