(*Define the Mexican hat function with singularity removed*)mexicanHat[x_,y_]:=Module[{r},r=Sqrt[x^2+y^2];
If[r<0.01,1,10 Sin[r]/r]]

(*Create the Mexican hat surface*)
hatPlot=Plot3D[mexicanHat[x,y],{x,-10,10},{y,-10,10},PlotStyle->Directive[LightOrange,Opacity[0.8]],Mesh->15,PlotPoints->80,BoxRatios->{1,1,1},PlotRange->All];

(*Find the height at the center of the hat*)
centerHeight=10; (*The limit as r->0 of Sin[r]/r is 1*)

(*Define top sphere radius and position*)
sphereRadius=0.5;
sphereCenter={0,0,centerHeight+sphereRadius};

(*Create the top sphere*)
topSpherePlot=Graphics3D[{Red,Opacity[0.9],Sphere[sphereCenter,sphereRadius]}];

(*Find the brim position-the first minimum of the Mexican hat*)
(*This occurs at r≈4.49 where Sin[r]/r has its first minimum*)
brimRadius=4.49;
brimHeight=mexicanHat[brimRadius,0];

(*Define bottom sphere at the brim*)
bottomSphereRadius=0.5;
bottomSphereCenter={brimRadius,0,brimHeight+bottomSphereRadius};

(*Create the bottom sphere*)
bottomSpherePlot=Graphics3D[{Blue,Opacity[0.9],Sphere[bottomSphereCenter,bottomSphereRadius]}];

(*Create tangential arrow at the bottom sphere*)
(*The tangent direction at the brim is perpendicular to the radial direction*)
(*At position (brimRadius,0),tangent points in (0,1,dz/dy) direction*)
(*Calculate the slope at the brim*)
delta=0.01;
slopeAtBrim=(mexicanHat[brimRadius,delta]-mexicanHat[brimRadius,-delta])/(2*delta);
(*Tangent direction (perpendicular to radial,following the surface)*)
tangentDirection=Normalize[{0,1,slopeAtBrim}];
(*Arrow parameters*)
tangentArrowLength=1.0;
tangentArrowTubeRadius=0.12;
tangentArrowHeadLength=0.5;
tangentArrowHeadRadius=0.35;
(*Start point at the sphere surface*)
arrowStartPoint=bottomSphereCenter+bottomSphereRadius*tangentDirection;
arrowEndPoint=arrowStartPoint+tangentArrowLength*tangentDirection;
(*Create the tangential arrow*)
tangentialArrowPlot=Graphics3D[{Purple,Opacity[0.9],EdgeForm[None],Tube[{arrowStartPoint,arrowEndPoint},tangentArrowTubeRadius],Cone[{arrowEndPoint,arrowEndPoint+tangentArrowHeadLength*tangentDirection},tangentArrowHeadRadius]}];

(*Create circular arrow around the center*)
(*Define circle parameters*)
circleRadius=2; (*Radius of the circular path*)
circleHeight=centerHeight; (*Height at which circle sits*)
tubeRadius=0.15; (*Radius of the tube/cylinder*)

(*Create the circular tube using Tube*)
circularArrowPlot=Graphics3D[{Darker[Green],Opacity[0.9],EdgeForm[None],(*The circular tube*)Tube[Table[{circleRadius Cos[θ],circleRadius Sin[θ],circleHeight},{θ,0,1.8 Pi,0.02}],tubeRadius],(*Arrowhead at the end*){Darker[Green],Opacity[1],EdgeForm[None],Cone[{{circleRadius Cos[1.8 Pi],circleRadius Sin[1.8 Pi],circleHeight},{circleRadius Cos[1.8 Pi],circleRadius Sin[1.8 Pi],circleHeight}+0.6 {-Sin[1.8 Pi],Cos[1.8 Pi],0}},0.4]}}];

(*Create radial arrows along the surface pointing outward/downward*)
(*Number of arrows around the circle*)
numArrows=5;
(*Create path along the surface from center outward*)
arrowTubeRadius=0.1;
arrowHeadLength=0.5;
arrowHeadRadius=0.3;

(*Find where the surface height is halfway between center and brim*)
(*centerHeight=10,brimHeight≈-2.17,so halfway≈3.9*)
halfwayHeight=(centerHeight+brimHeight)/2;
(*This occurs around r≈2.5*)
endRadius=2.5;

(*Generate arrows at different angles*)
radialArrows=Table[Module[{angle,pathPoints,numPathPoints,startPos,endPos,direction},angle=2 Pi i/numArrows;
numPathPoints=60;
(*Create points along the surface from center to halfway down*)pathPoints=Table[{r Cos[angle],r Sin[angle],mexicanHat[r Cos[angle],r Sin[angle]]},{r,0.01,endRadius,(endRadius-0.01)/(numPathPoints-1)}];
startPos=First[pathPoints];
endPos=Last[pathPoints];
(*Direction for arrowhead*)direction=Normalize[endPos-pathPoints[[-2]]];
(*Arrow tube following the surface and cone at end*){Purple,Opacity[0.9],EdgeForm[None],Tube[pathPoints,arrowTubeRadius],Cone[{endPos,endPos+arrowHeadLength*direction},arrowHeadRadius]}],{i,0,numArrows-1}];

radialArrowPlot=Graphics3D[radialArrows];

(*Combine the plots*)
Show[hatPlot,topSpherePlot,bottomSpherePlot,circularArrowPlot,radialArrowPlot,tangentialArrowPlot,PlotRange->All,BoxRatios->Automatic,Boxed->False,Axes->False,AxesLabel->{"x","y","z"},ImageSize->Large,Lighting->"Neutral"]

(*Define the 3D parabola function with flat top*)maxHeight=9; (*Height where the parabola is truncated*)
parabola[x_,y_]:=x^2+y^2;

(*Create the parabola surface-only show where z<maxHeight*)
parabolaPlot=Plot3D[parabola[x,y],{x,-3,3},{y,-3,3},PlotStyle->Directive[LightOrange,Opacity[0.8]],Mesh->15,PlotPoints->80,BoxRatios->{1,1,1},RegionFunction->Function[{x,y,z},z<maxHeight],PlotRange->All];

(*Find the height at the bottom (center) of the parabola*)
bottomHeight=0; (*The minimum is at (0,0,0)*)

(*Define sphere radius and position at the bottom*)
sphereRadius=0.3;
sphereCenter={0,0,bottomHeight+sphereRadius};

(*Create the bottom sphere*)
bottomSpherePlot=Graphics3D[{Red,Opacity[0.9],Sphere[sphereCenter,sphereRadius]}];

(*Create circular arrow around the bottom*)
(*Define circle parameters*)
circleRadius=1.5; (*Radius of the circular path*)
circleHeight=0.5; (*Height below the parabola at this radius*)
tubeRadius=0.12; (*Radius of the tube/cylinder*)

(*Create the circular tube using Tube*)
circularArrowPlot=Graphics3D[{Darker[Green],Opacity[0.9],EdgeForm[None],(*The circular tube*)Tube[Table[{circleRadius Cos[θ],circleRadius Sin[θ],circleHeight},{θ,0,1.8 Pi,0.02}],tubeRadius],(*Arrowhead at the end*){Darker[Green],Opacity[1],EdgeForm[None],Cone[{{circleRadius Cos[1.8 Pi],circleRadius Sin[1.8 Pi],circleHeight},{circleRadius Cos[1.8 Pi],circleRadius Sin[1.8 Pi],circleHeight}+0.6 {-Sin[1.8 Pi],Cos[1.8 Pi],0}},0.35]}}];

(*Create radial arrows along the surface pointing outward/upward from valley bottom*)
(*Number of arrows around the circle*)
numArrows=5;

(*Create path along the surface from center toward outside*)
arrowTubeRadius=0.08;
arrowHeadLength=0.4;
arrowHeadRadius=0.25;

(*Start from very near the center (bottom of valley) and go outward/upward*)
startRadius=0.1; (*Changed from 0.8 to start near the bottom*)
endRadius=2.5;

(*Generate arrows at different angles*)
radialArrows=Table[Module[{angle,pathPoints,numPathPoints,startPos,endPos,direction},angle=2 Pi i/numArrows;
numPathPoints=60;
(*Create points along the surface from center to outside (upward)*)pathPoints=Table[{r Cos[angle],r Sin[angle],parabola[r Cos[angle],r Sin[angle]]},{r,startRadius,endRadius,(endRadius-startRadius)/(numPathPoints-1)}];
startPos=First[pathPoints];
endPos=Last[pathPoints];
(*Direction for arrowhead*)direction=Normalize[endPos-pathPoints[[-2]]];
(*Arrow tube following the surface and cone at end*){Red,Opacity[0.9],EdgeForm[None],Tube[pathPoints,arrowTubeRadius],Cone[{endPos,endPos+arrowHeadLength*direction},arrowHeadRadius]}],{i,0,numArrows-1}];
radialArrowPlot=Graphics3D[radialArrows];

(*Combine the plots*)
Show[parabolaPlot,bottomSpherePlot,circularArrowPlot,radialArrowPlot,PlotRange->All,BoxRatios->Automatic,Boxed->False,Axes->False,AxesLabel->{"x","y","z"},ImageSize->Large,Lighting->"Neutral"]