# How to plot a linear vector tangent to a Bézier surface?

I have a Bézier surface and its parameters are u and v. The partial differentiation with u as variable gives me a vector in the direction of u. I need to plot this vector.

I plugged in a particular value of u and v and got my partial derivative vector as {0, 1, 0.7}. How do I plot this vector on my surface as an arrow pointing in direction of u?

If you give us your equation, we can plot it directly. In the meantime...

myscalarField = Sin[x] - y^2 - z;
myvectorField = D[myscalarField, {{x, y, z}}];
v = VectorPlot3D[myvectorField,
{x, -2, 2}, {y, -2, 2}, {z, -2, 2},
VectorPoints -> 25,
VectorScale -> {0.1, Scaled[0.5]},
RegionFunction ->
Function[{x, y, z}, -0.1 <= myscalarField <= 0.1]];
c = ContourPlot3D[
myscalarField == 0,
{x, -2, 2}, {y, -2, 2}, {z, -2, 2},
Mesh -> None,
ContourStyle -> Opacity[0.5, Green]];
Show[v, c]


or... for a single vector:

myscalarField = Sin[x] - y^2 - z;
myvectorField = D[myscalarField, {{x, y, z}}];
c = ContourPlot3D[
myscalarField == 0, {x, -2, 2}, {y, -2, 2}, {z, -2, 2},
Mesh -> None,
ContourStyle -> Opacity[0.5, Green]];
v = Graphics3D[{Red,
Arrow[{beginvec = {Sin[0], 0^2, Sin[0] - 0^2},
beginvec + {.5, .5, .5}}]}];
Show[c, v]