# How to solve error "Coordinate should be a triple of numbers, or a Scaled form"

I am trying to plot an arrow in the direction of the gradient. This is my code:

Graphics3D[{Red, Arrowheads[0.07],
Arrow[Tube[{{x0, y0,
F[x0, y0]}, {{x0, y0, F[x0, y0]} + gradF[x0, y0, F[x0, y0]]/
Norm[gradF[x0, y0, F[x0, y0]]]}, {{x0, y0, F[x0, y0]} +
0.05]]}]


However, i am getting the error on the description. I am trying to solve it but i am not able to. This is gradF

gradF[x_, y_, z_] = Grad[F1[x, y, z], {x, y, z}]


and this is F1

F1[x_, y_, z_] := F[x, y] - z;


this is F

F[x_, y_] := -( x^2 + y^2);


I am trying to understand exactly why i am getting that error so i can solve it my self in the future. Let me know if you need more details of the code. Any help will be appreciated.

• x0 and y0 need to be numbers, and you have two many {} around the second and third elements of the Tube. Look at the InputForm of your expression. Jun 7, 2017 at 17:06
• @CarlWoll This is inside a Manipulate and x0 and y0 are the parameters that i manipulate. Does that matter? Jun 7, 2017 at 18:00

As I said in the comments, look at the InputForm of the graphics:

With[{x0=1,y0=1},
Graphics3D[{
Arrow[Tube[
{
{x0,y0,F[x0,y0]},
},
0.05
]]
}]
]//InputForm


Graphics3D[{RGBColor[1, 0, 0], Arrowheads[0.07], Arrow[Tube[{{1, 1, -2}, {{1/3, 1/3, -7/3}}, {{1/3, 1/3, -7/3}}}, 0.05]]}]

You should see that the second and third elements of the argument to Tube have an extra {} around them. If you remove these extra braces, you will have:

With[{x0=1,y0=1},
Graphics3D[{

The above produces a valid Graphics3D object.