Manipulate and figures for the Mexican hat potential.

<<peeters` ;
peeters`setGitDir[ "../project/figures/phy2403-quantum-field-theory" ]

ClearAll[potential]
potential[x_, y_, v_] := (x^2 + y^2 - v^2)^2

Manipulate[
Plot3D[ potential[x, y, v], {x, -5, 5}, {y, -5, 5}, PlotRange->Full],
{{v,4}, 0, 10}
]

q= DynamicModule[{v=0.`},Plot3D[potential[x,y,v],{x,-5,5},{y,-5,5},PlotRange->Full]]

p = DynamicModule[{v=4.32`},Plot3D[potential[x,y,v],{x,-5,5},{y,-5,5},PlotRange->Full]]

peeters`exportForLatex["mexicanHatPotentialFig1", p]
peeters`exportForLatex["mexicanHatPotentialFig2", q]

Import["https://raw.githubusercontent.com/jkuczm/MathematicaCellsToTeX/master/NoInstall.m"]

CellToTeX[Cell[BoxData[{RowBox[{"ClearAll","[","potential","]"}],"
",RowBox[{RowBox[{RowBox[{"potential","[",RowBox[{"x_",","," ","y_",","," ","v_"}],"]"}]," ",":="," ",RowBox[{RowBox[{"(",RowBox[{RowBox[{"x","^","2"}]," ","+"," ",RowBox[{"y","^","2"}]," ","-"," ",RowBox[{"v","^","2"}]}],")"}],"^","2"}]}],"
"}],"
",RowBox[{"Manipulate","[","
",RowBox[{RowBox[{"Plot3D","["," ",RowBox[{RowBox[{"potential","[",RowBox[{"x",","," ","y",","," ","v"}],"]"}],","," ",RowBox[{"{",RowBox[{"x",","," ",RowBox[{"-","5"}],","," ","5"}],"}"}],","," ",RowBox[{"{",RowBox[{"y",","," ",RowBox[{"-","5"}],","," ","5"}],"}"}],","," ",RowBox[{"PlotRange","->","Full"}]}],"]"}],",","
",RowBox[{"{",RowBox[{RowBox[{"{",RowBox[{"v",",","4"}],"}"}],","," ","0",","," ","10"}],"}"}]}],"
","]"}]}],"Input",CellChangeTimes->{{3.7482058365909157`*^9,3.748206019589754*^9},3.748206379561644*^9}]]

Manipulate[
Plot3D[ (x^2 + y^2 - vsq)^2, {x, -5, 5}, {y, -5, 5}, PlotRange->Full],
{{vsq,16, "(v^2)"}, -10, 50,Appearance->"Labeled"}
]