Here is another way to get points equally spaced by chord-length. It will give a good result if the chord length is relatively small compared to the maximum radius of curvature along the curve. (If, say, the chord length is no greater than the maximum radius, then between successive points, the turning will be less 60 deg., and the difference between the chord and arc lengths will be less than 5%).
The method is fast because the objective function, which is the sum of the squares of the differences in the lengths of adjacent chords, is quick to be minimized (provided the initial values are ordered). Another reason is that the speed of this particular parametrization does not vary much, which leads to excellent initial points.
The first and last point are set equal to the end points of the curve. The code below assumes that the parametrization is periodic. The end points are assumed to be equal and one of them is discarded.
xFN = KnotData[{3, 1}, "SpaceCurve"];
nPts = 80; (* number of points *)
Block[{t},
t[1] = 0; t[nPts + 1] = 2 Pi; (* initialize end points *)
sols = Array[t, nPts] /.
Last@FindMinimum[
Total[Differences[Norm /@ Differences[xFN /@ Array[t, nPts + 1]]]^2],
Table[{t[i], (i - 1)/(nPts) 2 Pi}, {i, 2, nPts}]]; (* omit end points *)
]
Show[
Graphics3D[{Red, Translate[Sphere[{0, 0, 0}, 0.08], xFN /@ sols]}],
ParametricPlot3D[xFN[t], {t, 0, 2 Pi}]
]
P.S. If you desire relatively few points so that the chord length is greater than the radius of curvature, then generate many points and down-sample. To get the 80 points above took slightly over 1/20 sec. One can get 8 equally spaced points from the above calculation by using sols[[;; ;; 10]]
:
Show[Graphics3D[{Red, Translate[Sphere[{0, 0, 0}, 0.08], xFN /@ sols[[;; ;; 10]]]}],
ParametricPlot3D[xFN[t], {t, 0, 2 Pi}]]
KnotData[{3, 1}, "SpaceCurve"]
will give you the space curve as a pure function, e.g.{Sin[#1] + 2 Sin[2 #1], Cos[#1] - 2 Cos[2 #1], -Sin[3 #1]} &
. You should be able to at least numerically determine the arc length to get your points... $\endgroup$