Q:

Using VectorPlot3D gives me the following error: "Value of option PlotPoints -> {} is not an integer >= 2"

f[x, y] := {1 - ((20 - x)/20)^y}
scalarField = (1 - ((20 - x)/20)^y) - z       (*This is the same as f[x, y] - z, used later*)
vectorField = D[scalarField,  {{x, y, z}}]

In[98]:= v = VectorPlot3D[vectorField, {x, 0.001, 10}, {y, 0.001, 5}, {z, 0, 1}, 
                          RegionFunction -> Function[{x, y, z}, TrueQ[f[x, y] == z]], 
                          VectorPoints -> Automatic]

I get the following error:
VectorPlot3D::ppts: Value of option PlotPoints -> {} is not an integer >= 2.

I'm VERY new to Mathematica and the documentation doesn't really help me understand what I'm doing wrong.
What I want to happen is that I get only the vectors on the surface of f[x, y], so the documentation says I should be using the RegionFunction property. The Region function property was giving me even MORE errors before I wrapped it in TrueQ (it was claiming f[x,y] == z wasn't boolean).
What am I doing wrong?

A:

Another way to get the desired sampling:
ClearAll[f];
f[x_, y_] := {1 - ((20 - x)/20)^y}
scalarField = (1 - ((20 - x)/20)^y) - z;
vectorField = D[scalarField, {{x, y, z}}];

r = Plot3D[f[x, y], {x, 0.001, 10}, {y, 0.001, 5}, Mesh -> None, 
   MaxRecursion -> 0, PlotPoints -> 9, NormalsFunction -> None];

v = VectorPlot3D[
  vectorField, {x, 0.001, 10}, {y, 0.001, 5}, {z, 0, 1}, 
  VectorPoints -> 
   Cases[r, {_Real, _Real, z_Real}, Infinity],
  VectorScaling -> Automatic]

