0
$\begingroup$

I want to show a three-dimensional region that is defined as a level set of a function.

sigma2[x1_, x2_] := -Log[x1] - Log[x2]

ContourPlot3D[ sigma2[(1/2 - a/Sqrt[2] + b/Sqrt[6] + c/(2 Sqrt[3]))/(1/2 - (Sqrt[3] c)/2), 
(1/2 - Sqrt[2/3] b + c/(2 Sqrt[3]))/(1/2 - (Sqrt[3] c)/2)] 
== (1/2 + a/Sqrt[2] + b/Sqrt[6] + c/(2 Sqrt[3]))/(1/2 - (Sqrt[3] c)/2),
{a, -2, 1}, {b, -2, 1.5}, {c, -.5, 1}, ContourStyle -> None]

but it looks terrible. I have

Contourstyle->None

because I'll deal with making it look pretty later. Here's the result of that input

Sure wish this looked better

I believe the issue is that the function varies a lot over there on the right. That's the part I'm most interested in seeing, though. I've tried playing with both the MaximumRecursion and PlotPoints options. Allowing lots of recursion doesn't seem to do what I want, because I get some garbage inside of the region which I don't want. Increasing PlotPoints will improve the situation incrementally, but I think it would just take way too many points to run in a realistic time in order to show the region properly.

I think what I want is to convince Mathematica to sample more where I need it, and not more where I don't. I see there is an option called "Methods" but I don't know what other methods are available.

Any thoughts? Willing to give more background on where the region came from if necessary. It is the result of a projective transformation performed on the graph of the function sigma.

$\endgroup$
2
  • 2
    $\begingroup$ Have you tried increasing PlotPoints and MaxRecursion? $\endgroup$
    – anderstood
    Apr 2, 2018 at 23:27
  • $\begingroup$ I don't get your plot in V11.3. It's not perfect, but someone might think it's passable. $\endgroup$
    – Michael E2
    Apr 3, 2018 at 0:15

1 Answer 1

1
$\begingroup$

On Mathematica 11.2 (Linux), the following gives a nice surface, without changing PlotPoints and MaxRecursion:

sigma2[x1_, x2_] := -Log[x1] - Log[x2]
f[a_, b_, c_] = 
  sigma2[(1/2 - a/Sqrt[2] + b/Sqrt[6] + 
         c/(2 Sqrt[3]))/(1/2 - (Sqrt[3] c)/2), (1/2 - Sqrt[2/3] b + 
         c/(2 Sqrt[3]))/(1/2 - (Sqrt[3] c)/2)] - (1/2 + a/Sqrt[2] + 
        b/Sqrt[6] + c/(2 Sqrt[3]))/(1/2 - (Sqrt[3] c)/2) // N // 
   Simplify;
ContourPlot3D[f[a, b, c] == 0, {a, -2, 1}, {b, -2, 1.5}, {c, -.5, 1}, 
 ContourStyle -> None]
$\endgroup$

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.