Here is my code
V[x_, y_] := ω^2/2*(x^2 + y^2) - \[Epsilon]*(-(x^6/6) + 5/2*x^4*y^2 - 5/2*x^2*y^4 + y^6/6);
f[x_, y_] := x^2 + y^2;
ω = 1; \[Epsilon] = 1;
h = 1.1;
rad = 1.8*h;
xmin = 2;
P00 = Show[{{Normal@
ContourPlot[f[x, y] == rad, {x, -xmin, xmin}, {y, -xmin, xmin},
ContourStyle -> {Red, Dashed, Thick}, PlotPoints -> 200,
PerformanceGoal :> "Quality",
RegionFunction -> (V[#1, #2] < h &), MaxRecursion -> 4] /.
Line[{p1_, pp___, p2_}] :>
GeometricTransformation[Line[{p1, pp, p2}],
ReflectionTransform[Cross[p2 - p1], p2]],
ContourPlot[V[x, y] == h, {x, -xmin, xmin}, {y, -xmin, xmin},
ContourStyle -> {Black, Thickness[0.007]}, PlotPoints -> 200,
PerformanceGoal :> "Quality"]}}, FrameLabel -> {"x", "y"},
RotateLabel -> False,
FrameStyle -> Directive[FontSize -> 20, FontFamily -> "Helvetica"],
PlotRange -> All, PlotRangePadding -> None, ImageSize -> 550]
and this is the corresponding output
As you can see, there is an unwanted angle in the red dashed line. It should be smooth as the rest five since the function is symmetrical. I tried to increase the PlotPoints
and the MaxRecursion
but the problem remains.
Any suggestions on how to fix this?
Many thanks in advance!
Line
primitives which are individually being reflected. $\endgroup$