As @Alec_Loudenback suggests, you should be able to do this using BSplineKit.jl.
Here is how you would get a parametric spline interpolation (the example is in 2D because it’s easier to visualise, but the same works in 3D):
using BSplineKit
using GeometryBasics
P₁ = Point2(0.0, 0.0)
P₂ = Point2(1.0, 1.0)
P₃ = Point2(1.0, 1.2)
P₄ = Point2(0.3, 0.9)
t = 0:3
A = [P₁, P₂, P₃, P₄]
Q = interpolate(t, A, BSplineOrder(4))
using CairoMakie
tfine = 0:0.1:3
fig = Figure()
ax = Axis(fig[1, 1])
lines!(ax, Q.(tfine))
scatter!(ax, A)
fig
Note that I’m interpolating using B-splines of order k = 4, which means cubic splines in the BSplineKit convention. To get the very same result as in Interpolations.jl, you could also try using Natural boundary conditions as explained here, which I’m not doing here to keep things simple.
As you mentioned, and keeping your notation, the interpolating spline can be written as Q(t) = \sum_i P_i' N_i(t), where the N_i(t) are the B-spline basis functions (i \in [1, 4] in the example).
In my example, one can easily evaluate each basis function as:
julia> B = basis(Q) # get underlying B-spline basis
4-element BSplineBasis of order 4, domain [0.0, 3.0]
knots: [0.0, 0.0, 0.0, 0.0, 3.0, 3.0, 3.0, 3.0]
julia> B[2](2.13) # either evaluate B-spline N₂ at point t = 2.13...
0.17913300000000004
julia> B(2.13) # ...or evaluate all B-splines which are non-zero at t = 2.13
(4, (0.357911, 0.43856700000000004, 0.17913300000000004, 0.024389000000000008))
The last method is more efficient, especially if you want to evaluate all non-zero B-splines at a point. As explained here, what this returns is the index i of the last B-spline, and then the evaluated B-splines in reverse order. In other words, the result above gives you (N_4(t), N_3(t), N_2(t), N_1(t)). I hope this helps!
And in case you need them, the interpolation coefficients P'_i themselves can be obtained as:
julia> coefficients(Q)
4-element Vector{Point2{Float64}}:
[0.0, 0.0]
[1.5999999999999996, 1.4999999999999998]
[1.2500000000000002, 1.3499999999999999]
[0.3, 0.9]
