# How to plot curved arrows on a surface?

I am trying to plot a curved arrow on a wavy surface. I tried a couple of approaches using the Arrow command but the results are not aesthetically pleasing bec

1. The arrow gets hidden from the view I want to see it from.Is it possible to plot an arrow that is always facing the camera in the desired "proper" way?
2. The curve itself isn't very visible and produces artifacts with the surface. Is there a way to avoid this?

My code:

f[x_, y_] := Sin[x + y^2]/5;
Show[Plot3D[f[x, y], {x, -3, 3}, {y, -2, 2}, PlotPoints -> 70,
MeshStyle -> None, PlotStyle -> Opacity[0.8]],
Arrow[Table[{0.5 + Cos[\[Theta]], Sin[\[Theta]],
f[0.5 + Cos[\[Theta]], Sin[\[Theta]]] + 0.01}, {\[Theta], 0,
2 \[Pi], \[Pi]/20}], {0, -0.1}]}]]


My image:

• We are unable to execute your code because you have not provided the definition for f[x, y] Commented Jan 5 at 0:20
• Thanks for pointing that out. Updated. Commented Jan 5 at 18:51

Use a Tube with the Arrow

\$Version

(* "13.3.1 for Mac OS X ARM (64-bit) (July 24, 2023)" *)

Clear["Global*"]

f[x_, y_] := Cos[x]*Sin[y]

Show[
Plot3D[Evaluate@f[x, y], {x, -3, 3}, {y, -2, 2},
PlotPoints -> 70,
MeshStyle -> None,
PlotStyle -> Opacity[0.8]],
Arrow[Tube[
Table[{0.5 + Cos[θ], Sin[θ],
f[0.5 + Cos[θ], Sin[θ]] + 0.01},
{θ, 0, 2 π, π/20}], 0.025]]}]]


• Great, this gave me the right idea on what to do. A couple of minor improvements: 1. Changing the color from black to something lighter makes the arrow looks aesthetically pleasing. 2. It is better to use Show[Graphics3D[...],Plot3D[...]] than the other way around because that produces good arrows regardless of plot range. Commented Jan 6 at 0:15

Here is one approach to avoid Graphics3D by using Mesh.

f[x_, y_] := Sin[x + y^2];
Plot3D[f[x, y], {x, -3, 3}, {y, -2, 2}, PlotPoints -> 70,
PlotStyle -> Opacity[0.8],
MeshFunctions -> Function[{x, y}, (x - .5)^2 + y^2], Mesh -> {{1}},
MeshStyle -> Thick, BoundaryStyle -> None] /.
Line[pts_] :> {Arrowheads[{{.05, .75}}], Appearance -> "Projected",
Arrow[pts]}
`

• Thanks for the suggestion. It solves issue 2 of my question very well. However, it isn't solving issue 1 yet. As your picture shows, the arrow isn't "in line" with the curve. Further, when I rotate the plot around, the arrow gets hidden and points perpendicular to the surface. Commented Jan 5 at 20:43