# How to show a time-dependent vector (velocity) with Manipulate? [duplicate]

I have this problem: I want to show the velocity vector Arrow[{pos, pos + vel}] with Manipulate

posicion = {ρ Cos[ω t],ρ Sin[ω t], a t};
parametros = {ρ -> 1, ω -> 1/2, a -> 1/5};
pos = posicion /. parametros;
ac = aceleracion /. parametros;
trayectoria = ParametricPlot3D[pos, {t, 0, 10 Pi}, PlotStyle -> Red];

Manipulate[Show[trayectoria, Graphics3D[Arrow[{pos, pos + vel}]]], {t, 0, 10 Pi}]


And appears this message:

Coordinate {Cos[0.5 CellContext't], Sin[0.5 CellContext't], 0.2 CellContext't} should be a triple of numbers, or a Scaled form.

I don't know what's the problem with the code.

## marked as duplicate by Kuba♦, m_goldberg, Mr.Wizard♦Aug 14 '16 at 16:03

• – Kuba Aug 14 '16 at 9:23

By defining your kinematics equations as top-level expressions (rather than as functions of the relevant quantities), you invite scoping problems. I recommend working with functions and making the Manipulate expression self-contained. Implementing that will simplify your work as well saving you worry about variable scoping issues. Here is how I would do it.

With[{ρ = 1, ω = 1/2, a = 1/5},
Manipulate[
Show[
Graphics3D[
ParametricPlot3D[posicion[u], {u, 0, 10 Pi}, PlotStyle -> Red],
Boxed -> False],
{t, 0, 10 Pi},
Initialization :> (
posicion[t_] := {ρ Cos[ω t], ρ Sin[ω t], a t};


Short and simple, no? • That's perfect! Thank you very much! – Gee45 Aug 24 '16 at 3:34

You can do it thus:

Manipulate[
Show[trayectoria,
Graphics3D[Arrow[{pos, pos + vel} /. t -> α]]], {α, 0,
10 Pi}] • Thank you! but, why I have to change "t"? – Gee45 Aug 13 '16 at 21:36
• @Gee45 becasue it would interfere with trayectoria – joojaa Aug 14 '16 at 7:20