At least, Interpolation of Bézier curves of arbitrary order is not super-complicated.

If a Point on a Bezier is P’ = PxMxT, where P are the Controlpoints, M the Binom-Coefficients and T is the Polynomial Term, then you need to reverse that to get P. Instead of providing n-control-points you are providing n-points on that curve, where each point corresponds to a given parameter on the future curve.

E.g. if you look for a curve of order=m= 4, then degree = n = 3 (n=m-1)

Input:

→ 4 Points (optionally we can also define the 4 parameters (=t0-t3))

Output:

→ 4 Control-Points

T(n,k,t) = (1-t)^{n-1}*t^k

M(n,k) = \frac{n!}{k!(n-k)!}

we assume equally spacing of the parameters:

t0 = 0.0, t1 = 0.333, t2 = 0.666, t3 = 1.0

order:

m = 4

degree:

n = m-1 = 3

we can set up an equation system to find the x coordinate of the controlpoints:

M(n,0)* T(n,0,t0)*x0 + M(n,1) * T(n,1,t0) *x1 + M(n,2) *T(n,2,t0)*x2 + M(n,3) *T(n,3,t0)*x3 = P’(0).X

M(n,0)* T(n,0,t1)*x0 + M(n,1) * T(n,1,t1) *x1 + M(n,2) *T(n,2,t1)*x2 + M(n,3) *T(n,3,t1)*x3 = P’(1).X

M(n,0)* T(n,0,t2)*x0 + M(n,1) * T(n,1,t2) *x1 + M(n,2) *T(n,2,t2)*x2 + M(n,3) *T(n,3,t2)*x3 = P’(2).X

M(n,0)* T(n,0,t3)*x0 + M(n,1) * T(n,1,t3) *x1 + M(n,2) *T(n,2,t3)*x2 + M(n,3) *T(n,3,t3)*x3 = P’(3).X

Solve that with a **Gaussian Solver** and repeat that for Y and Z et voilà!

Hope this helps…