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?



f[x, y]should bef[x_, y_], but the problem is thatTrueQ[f[x, y] == z]is always false. Hence there is no region to plot. It like writingRegionFunction -> Function[{x, y, z}, False]$\endgroup$f[x, y] == zalways False? There are values(x, y, z)for whichTrueQ[f[x,y] == z]isTrue. For example:TrueQ[f[3, 3] == {3087/8000}]$\endgroup$