1
$\begingroup$

I'm able to plot some graphs over small domains, but not others.

For example, this works just fine:

ContourPlot3D[{x == y, x == -y}, {x, -10^-20, 10^-20}, {y, -10^-20, 10^-20}, {z, -10^-20, 10^-20}]

But when I try to zoom in on the intersection of some more complex surfaces…

f1[x_, y_, z_] := x + x*y + z - y*z - (Sqrt[6]/4) (y^2 + 1)
f2[x_, y_, z_] := x^2 + y^2 - 1/2
f3[x_, y_, z_] := x - y - x*z - y*z
ContourPlot3D[{f1[x,y,z] == 0, f2[x,y,z] == 0, f3[x,y,z] == 0},
  {x, 0.5058981, 0.5058982}, {y, 0.4940314, 0.4940315}, {z, 0.0118675, 0.0118676}]

…the result is sorta abstract expressionism:

enter image description here

Increasing WorkingPrecision doesn't help.

Nor does making the entire graph 100× "bigger":

f1[x_, y_, z_] := x/100 + x/100*y/100 + z/100 - y/100*z/100 - (Sqrt[6]/4) ((y/100)^2 + 1)
…
ContourPlot3D[{f1[x,y,z] == 0, f2[x,y,z] == 0, f3[x,y,z] == 0},
  {x, 0.5058981*100, 0.5058982*100}, …

I have some plots with small features that I'd like to zoom in on. What's the best way to do that?

Edit - On further experimentation, it seems like the issue is distance from the origin, not complexity of the functions. E.g. ContourPlot3D[{x==y}, {x,-10^-7,10^-7}, {y,-10^-7,10^-7}, {z,-10^-7,10^-7}] works, but ContourPlot3D[{x==y}, {x,1-10^-7,1+10^-7}, {y,1-10^-7, 1+10^-7}, {z,-10^-7,10^-7}] is glitchy. (±10^-7 v.s. 1±10^-7) This suggests a floating point precision issue. But if it's a precision issue, why doesn't WorkingPrecision help?

$\endgroup$
2
  • $\begingroup$ PlotPoints->100 $\endgroup$ Jul 19, 2021 at 3:12
  • $\begingroup$ @david-g-stork That doesn't seem to help. $\endgroup$
    – ppm
    Jul 19, 2021 at 16:46

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.