5

Bug fixed by 13.1

I am trying to run the following code, taken from https://reference.wolfram.com/language/ref/ContourPlot3D.html:

ContourPlot3D[
 x^4 + y^4 + z^4 - (x^2 + y^2 + z^2)^2 + 3 (x^2 + y^2 + z^2) == 
  3, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}, Mesh -> None, 
 ContourStyle -> 
  Directive[Orange, Opacity[0.8], Specularity[White, 30]]]

The output is a pink box, see here:

pink box error

Why is that and is there a workaround to achieve the intended output that can be seen on the website linked above? I don't have this problem on my Windows machine, only when using my MacBook with M1 chip.

QuantumDot
  • 19,601
  • 7
  • 45
  • 121
user505117
  • 163
  • 3
  • 2
    The code works fine here (Mathematica 12.2, Mac OS 11.2.3) so maybe it is a M1 problem? – bill s May 09 '21 at 15:31
  • Hm. Probably a bug in Mathematica. After all the M1 ships a new type of graphics chip. And I don't thinkt that Mathematica is already optimized for it. You should tell Wolfram Technical Support about this. In the meantime, you might try to switch software rendering (which is slower!). Go to the menu "Mathematica"->"Preferences..."->"Advanced"->"OpenOptionInspector"->"Graphics Options"->"RenderingOptions" and play with the options there. I'd suggest to set "PreferredGPU" to "Software", to close Mathematica, restart, and see if it got better. – Henrik Schumacher May 09 '21 at 15:38
  • Also works with v12.2.0 for Mac OS X x86 (64-bit) (December 12, 2020) running on macOS v11.3.1 – Bob Hanlon May 09 '21 at 15:52
  • @HenrikSchumacher Switching to software rendering did not solve the problem, but thank you for the suggestion. – user505117 May 09 '21 at 15:55
  • @user505117 Oh my, I'm sorry. Maybe it helps to play also with the other settings... – Henrik Schumacher May 09 '21 at 15:56
  • 8
    This is known and IIRC you can set 3DRenderingEngine -> OpenGL globally in the Options Inspector to workaround the issue. – ihojnicki May 09 '21 at 17:38
  • The code works for me. – David G. Stork May 10 '21 at 00:51
  • 3
    @ihojnicki Thanks, that worked. If you post it as an answer I will accept it. – user505117 May 10 '21 at 21:31

1 Answers1

4

Posting the comment from @ihojnicki as an answer:

This is known and IIRC you can set 3DRenderingEngine -> OpenGL globally in the Options Inspector to workaround the issue.

Szabolcs
  • 234,956
  • 30
  • 623
  • 1,263