# Showing each component of velocity in a helix

In this animation, I want to show each component of velocity (V_x, V_y and V_z) with arrows in the respective direction that should change dynamically i.e the length of the arrows should represent the magnitude of their vectors.

Animate[ParametricPlot3D[{Cos[t], Sin[t], t/10}, {t, 0, u},
Mesh -> {{u}}, MeshStyle -> Red,
Method -> {"BoundaryOffset" -> False},
AxesLabel -> {"X", "Y", "Z"},
PlotTheme -> {"Scientific", "BoldColor"},
PlotRange -> {{-2, 2}, {-2, 2}, {0, 8}}] /.
Point -> (Sphere[#, .18] &), {u, 10^-6, 30}, AnimationRate -> 0.05]


• For a velocity vector v={a,b,c}, we use {a,b,c}.IdentityMatrix[3] to get it's components vx={a,0,0},vy= {0,b,0},vz= {0,0,c}.

• The vz={0,0,1/10} looks too small.

Clear[f, v, frame];
f[t_] = {Cos[t], Sin[t], t/10};
v[t_] = f'[t];
frame[t_] = v[t]*IdentityMatrix[3];
Animate[Show[
ParametricPlot3D[{Cos[t], Sin[t], t/10}, {t, 0, u},
AxesLabel -> {"X", "Y", "Z"},
PlotTheme -> {"Scientific", "BoldColor"},
PlotRange -> {{-2, 2}, {-2, 2}, {0, 8}}],
Arrow[{f[u], f[u] + #}] & /@ frame[u]}}]], {u, 10^-6, 30},
AnimationRate -> 0.05]

Simplify[Sqrt[v[t] . v[t]], Assumptions -> t ∈ Reals]


Sqrt[101]/10

So the norm of the velocity is a constant.

• Thank you @cvgmt . Your code paved the path for my desired answer. What should I do now to get Y components always parallel to the x and y axes and what should I do for the Z component? f[t_] = {Cos[t], Sin[t], t/10}; v[t_] = f'[t]; Animate[Show[ParametricPlot3D[{Cos[t], Sin[t], t/10}, {t, 0, u},AxesLabel -> {"X", "Y", "Z"}, PlotTheme -> {"Scientific", "BoldColor"},PlotRange -> {{-2, 2}, {-2, 2}, {0, 8}}],Graphics3D[{Red, Arrow[{f[u], f[u] + v[u][[1]]}], Darker[Green], Arrow[{f[u], f[u] + v[u][[2]]}]}]], {u, 10^-6, 30}, AnimationRate -> 0.05] Sep 16, 2022 at 7:02
• Thank you for the edit. Just one more thing. How can I Scale the arrows? For my original equations, one of the arrows is touching 600 on y axis. I want to scale it show that it falls in a visible region of the plot Sep 16, 2022 at 11:40
• @user84456 Maybe add scaling factor at v[t] or control Arrowheads. Sep 16, 2022 at 12:09
• DiagonalMatrix[{a, b, c}] Sep 17, 2022 at 7:34
• What is this? Could you please elaborate a little? Sep 17, 2022 at 12:27

If I understand you right. You can adjust the scale and the arrow type as needed.

Manipulate[
Module[{p1, p2, xa, ya, za, scale = 2},
p1 = ParametricPlot3D[{Cos[t], Sin[t], t/10}, {t, 0, u},
Mesh -> {{u}}, MeshStyle -> Red,
Method -> {"BoundaryOffset" -> False},
AxesLabel -> {"X", "Y", "Z"},
PlotTheme -> {"Scientific", "BoldColor"},
PlotRange -> {{-2, 2}, {-2, 2}, {0, 8}}, ImageSize -> 500] /.
Point -> (Sphere[#, .1] &);
Arrow[{{Cos[u], Sin[u], u/10}, {scale*Cos[u], Sin[u], u/10}}]},
Text["x", {scale*Cos[u], Sin[u], u/10}, {1, 0}]};