So I need to find out where the control points would be for a cubic bezier curve when only knowing points on the curve, the points can lie in 3D. It would be ideal if I could do this for any number of points on the curve. Most of what I have found deals only with 2D, or only for 4 points.
Share
Let me see if I understand you:
you want an interpolating Bezier curve,
going through a given set of points P0 P1 …
but drawn as Bezier curves, with a function like
That is, you want to derive two Bezier control points Cj, Dj
for each piece Pj — Pj+1 ?
One way of deriving such control points is to use the Bernstein polynomial basis
and look up or derive the interpolating aka Catmull-Rom spline
that goes through P-1 P0 P1 P2:
We want bezier4(t) to be exactly the same curve as CatmullRom(t), so:
Given N points P0 P1 … (in 2d 3d … anyd), take them 4 at a time;
for each 4, that formula gives you 2 control points Cj, Dj for
Does this make sense, is it what you want ?
(For a bounty, I’d cobble some Python / numpy together.)