I am trying to run the following code:
f[t_] := {Cos[t], Sin[t], Cos[t]}
s = 0.1;
s1 = 2;
t[u_] := Normalize[f'[u]]
n[u_] := Normalize[t'[u]]
b[u_] := t[u]\[Cross]n[u]
Graphics3D[
{
BSplineCurve[Table[f[u], {u, 0, 2 Pi, s}]],
Arrow[Table[{f[u], t[u]}, {u, 0, 2 Pi, s1}]],
Arrow[Table[{f[u], n[u]}, {u, 0, 2 Pi, s1}]]
}
]
It works fine until I ask it to compute Arrow[Table[{f[u], t[u]}, {u, 0, 2 Pi, s1}]]
. Trying to understand what the error was, I tried to compute n[1]//N
and I noticed I obtain this:
Ie: It seems Mathematica differentiates Abs[x]
but doesn't know what to so with it later. I tried to compute Abs'[1]
and it didn't work. Is there something I can do for this to work? Perhaps some assumption I could use where it replaces Abs'[x]
for something Mathematica knows how to handle?
t[u_] := Simplify[Normalize[f'[u]], Assumptions -> u \[Element] Reals]
. $\endgroup$Abs
is not complex differentiable, so you must insist to Mathematica that your domain is the reals. $\endgroup$