Your TNB frame for the second parametrization is not going to be the same as it is for the first, but it looks like you are assuming that it will be.
Compute the Tangent, Normal and Binormal vectors for the parametrization of the helix given by $$X(t) = ( \cos(t), \sin(t), t )$$ and then set the values of L, e0, n0, b0
accordingly in your spiralAnother()
function.
The Serret-Frenet formula in the case where the curve is not parametrised by arc-length are
$$\frac{1}{V_r(t)}\frac{d}{dt}\begin{pmatrix} T\\ N\\ B \end{pmatrix} = \begin{pmatrix} 0 & \kappa & 0\\-\kappa & 0 & \tau \\ 0 &-\tau & 0\end{pmatrix} \begin{pmatrix} T\\N \\B \end{pmatrix}$$
where $V_r(t)=\Vert \dot{r}(t) \Vert$ is the speed of your curve. This is true because in the case of non-arc-legnth parametrisation, the definition of torsion and curvature changes, in order to take into account the speed. Namely, we have that for a $C^3$ biregular curve, the torsion is defined by
$$\tau = \frac{1}{V_r} \langle B, \dot{N} \rangle$$
and the curvature $\kappa$ is defined as the norm of the curvature vector
$$K = \frac{1}{V_r} \dot{T}$$
Assuming that all these quantities are well defined (which requires, as I mentionned earlier, that the curve be at least $C^3$ and biregular), then it holds that the "trace", or the image of the curve, is invariant under reparametrisation (actually we even need a lot less: assuming merely that the curve is $C^1$ and regular is enough, for instance).
Serret-Frenet formulas provide a cinematic interpretation of the curvature and the torsion. Locally, these quantities tell you how the curve is going to evolve. More generally, it is possible to show that (under the usual hypothesis $C^3$ and biregular) if two curves parametrised by arc-length possess same curvature and same torsion, then they are "equal" in the sense that there exists a deplacement of $\mathbb{R}^3$ from one onto the other. Therefore curvature and torsion control all the geometry of the curve, and thus solving Serret-Frenet completely determines the curve.
A further refinement of this theorem would be that if you arbitrarily give two (continuous) functions, one for curvature, and one for torsion, then there exists a unique curve parametrised by arc-length whose curvature and torsion are the one prescribed (up to a deplacement of the space).
Best Answer
You need a starting point $\gamma_0$ of your curve $\gamma$. Then you can solve the initial value problem: $$\begin{align}\gamma'(s) &= T(s), \\ T'(s) &= \kappa(s) N(s), \\ N'(s) &= -\kappa(s)T(s) + \tau(s)B(s), \\ B'(s) &= -\tau(s)N(s), \\ \gamma(0) = 0,\, T(0) &= T_0,\, N(0) = N_0,\, B(0) = B_0\end{align}$$