I generated a spline function called f
using the BSplineFunction
with domain {t, 0, 1}
.
f = BSplineFunction[{{0., 5.81152}, {-0.909122, 5.73997}, {-1.86805, 5.5031},
{-1.79586, 5.52709}, {-2.40811, 5.28912}, {-3.4109, 4.70527}, {-4.68131, 3.501},
{-4.93131, 2.99958}, {-5.09697, 2.6673}, {-5.34697, 2.16588}, {-5.59697, 1.66446},
{-5.84697, 1.16304}}, SplineWeights -> {10, 10, 10, 1, 1, 1, 1, 1, 1, 10, 10, 10}]
I then wanted to find the points at which the function intersects the piecewise linear function joining the spline's control points. Graphically, I know the intersection occurs within the domain of f
.
k[t_] = {-4.93131 - 0.915666 t, 2.99958 - 1.83654 t}
However, running the code:
FindRoot[First[k[0]] == First[f[t]], {t, .5, 0, 1}]
where k[0]
is the end of the line, produces a negative number. Is there a way to solve for the intersection points of those two functions?
f[t]
does not return a value of t...it yields x and y coordinates for the domain0<t<1
.FindRoot[First[k[0]] == First[f[t]], {t, .5, 0, 1}]
should yield the value of t at which the x coordinate is equal to -4.93131. Is that correct or am I completely missing something? $\endgroup$