6

I just updated my Mathematica for Windows to 13.3 and when I tried to use the "Graphics MeshFindIntersections" command it doesn't seem to work. Have they replaced it with some other command or is it a bug in the new update?

Code used

T[rh_, Q_, P_] := 1/(4 \[Pi] rh) (1 + 8 \[Pi] P rh^2 - Q^2/rh^2)
M[rh_, Q_, P_] := rh/2 + (4 \[Pi] P rh^3)/3 + Q^2/(2 rh)
V[rh_] := 4/3 \[Pi] rh^3
S[rh_] := \[Pi] rh^2
G[rh_, Q_, P_] = Simplify[M[rh, Q, P] - (T[rh, Q, P] S[rh])];
{rc, Pc} = 
  SolveValues[{D[T[rh, Q, P], {rh, 2}] == 0, 
     D[T[rh, Q, P], rh] == 0}, {rh, P}][[2]];
Vc = V[rc]; Tc = T[rc, Q, Pc]; Gc = G[rc, Q, Pc];
T = t Tc; P = p Pc; rh = z rc; G = g Gc;
t[z_, p_] = 
  SolveValues[{T == 1/(4 \[Pi] rh) (1 + 8 \[Pi] P rh^2 - Q^2/rh^2)}, 
    t][[1]];
g[z_, p_] = 
  SolveValues[{G == (3 Q^2)/(4 rh) + rh/4 - 2/3 P \[Pi] rh^3}, g][[1]];
pplt = ParametricPlot[Evaluate@{t[z, 0.5], g[z, 0.5]}, {z, 0, 10}, 
  PlotRange -> {{0.6, 1.3}, {0.8, 1.3}}, AspectRatio -> 1]
ip = Graphics`Mesh`FindIntersections@pplt
xzczd
  • 65,995
  • 9
  • 163
  • 468
codebpr
  • 2,233
  • 1
  • 7
  • 26

2 Answers2

11
$Version

"13.3.1 for Microsoft Windows (64-bit) (July 24, 2023)"

pt = Graphics`Mesh`FindIntersections[pplt // DiscretizeGraphics, 
  Graphics`Mesh`AllPoints -> False]
Show[pplt, Graphics[{Red, AbsolutePointSize[10], Point@pt}]]

{{0.757021, 1.07072}}

enter image description here

  • It must be a bug. Here we test another example.
Clear["Global`*"];
pp = ParametricPlot[{Sin[10 t], Sin[9 t]}, {t, 0, 2 π}];
intersections1 = Graphics`Mesh`FindIntersections[pp];
intersections2 = 
  Graphics`Mesh`FindIntersections[pp // DiscretizeGraphics, 
   Graphics`Mesh`AllPoints -> False];
{Show[pp, Epilog -> {Red, PointSize[Large], Point@intersections1}], 
 Show[pp, Epilog -> {Red, PointSize[Large], Point@intersections2}]}

enter image description here

cvgmt
  • 72,231
  • 4
  • 75
  • 133
2

Same problem with Annotation is in Finding intersection of two curves using mesh functions:

Block[{Annotation = # &}, ip = Graphics`Mesh`FindIntersections@pplt]

(* {{0.757021, 1.07072}} *)

Goofy
  • 2,767
  • 10
  • 12