# GraphicsMeshFindIntersections get extra intersections

Why am I getting some extra intersection points? Manipulate[b = 2 r + 1;
Show[p1 =
ContourPlot[{x^2 + (y - r)^2 == r^2, x/12 + y/b == 1}, {x, -20,
20}, {y, -20, 20}, Axes -> True, Frame -> False,
AspectRatio -> 1, PerformanceGoal -> "Goal"],
Graphics[{PointSize[Large], Red,
Point@GraphicsMeshFindIntersections[p1]}]], {{r, 4,


Why is this not plotting the right

Obviously, this should not have intersection in the pic above.

• Related: mathematica.stackexchange.com/questions/41496/… -- IIRC: The operation of FindIntersections changes from time to time, and several users would not base important code on it. Dec 6, 2020 at 15:44

Clear["Global*"]


You can use GraphicsMeshFindIntersections[p1, GraphicsMeshAllPoints -> False] to eliminate extra points; however, it will also miss the tangent point. It is easy to just solve for the intersections.

Manipulate[
Module[
{sol, b, eqns},
b = 2 r + 1;
eqns = {x^2 + (y - r)^2 == r^2, x/12 + y/b == 1};
sol = Solve[eqns, {x, y}, Reals] // Quiet;
ContourPlot[Evaluate@eqns,
{x, -20, 20}, {y, -20, 20},
Axes -> True,
Frame -> False,
AspectRatio -> 1,
PerformanceGoal -> "Goal",
Epilog -> {PointSize[Large], Red,
If[Length@sol > 0, Point[{x, y} /. sol], Nothing]}]],
{{r, 4, "Radius"}, -10, 10, 0.01, Appearance -> "Labeled"}] • Coordinate {{ConditionalExpression[$CellContextb^(-1) (12$CellContextb - 12 (4 (144 + $CellContextb^2)^(-1) (36$CellContextb + $CellContextb^2) - 8 2^Rational[1, 2] (-(144 +$CellContextb^2)^(-2) ((-9) $CellContextb^3 +$CellContextb^4))^Rational[1, 2])), should be a pair of numbers, or a Scaled or Offset form.
– kile
Mar 12, 2020 at 10:18
• The line is not moving with the slider
– kile
Mar 12, 2020 at 10:19
• @kile - restructured the Module`. Try it now. Mar 12, 2020 at 12:57