Let's start with a parametrized surface. Any one will do, but I guess being orientable helps in this case.
Then calculate the unit normal, and then create a Manipulate
Manipulate
object that lets you see how the normal behaves:
σ[u_, v_] := {(2 + Cos[v]) Cos[u], (2 + Cos[v]) Sin[u], Sin[v]}
n[u_, v_] := Evaluate[Normalize[
Cross[D[σ[u, v], u], D[σ[u, v], v]]
]]
surfacePlot =
ParametricPlot3D[σ[u, v], {u, -Pi, Pi}, {v, -Pi, Pi},
PlotRangePadding -> 1];
normalPlot =
ParametricPlot3D[n[u, v], {u, -Pi, Pi}, {v, -Pi, Pi},
PlotStyle -> Opacity[0.5]];
Manipulate[
{Show[{
surfacePlot,
Graphics3D[{Thick, Red,
Arrow[{σ @@ pt, σ @@ pt + n @@ pt}]}]
}],
Show[{
normalPlot,
Graphics3D[{Thick, Red, Arrow[{{0, 0, 0}, n @@ pt}]}]
}]
}
,
{pt, {-Pi, -Pi}, {Pi, Pi}}]
To show the entire vector field for a surface on parametric form you can use a bunch of Arrow
's:
Show[{
surfacePlot,
Graphics3D[
Table[
Arrow[{σ[u, v], σ[u, v] + n[u, v]}],
{u, -Pi, Pi, 0.4}, {v, -Pi, Pi, 0.4}]
]
}]
As you can see, the arrows are equally spaced in the parameter space, which leads to uneven distribution of arrows on the surface; it might be worth transforming the parametrization into $f(x,y,z)=0$ form to get a nicer result.