1

I have a figure that I created some time ago that includes 3 orthogonal planes. It rendered fine before, but now when I compile it, two planes render as triangles, and the third doesn't render at all. If I move lines of code around, maybe one renders as a square the way it's supposed to, one renders as a triangle, and the third doesn't at all.

I have v2.85 of asymptote running on a MacBook Pro. TeXlive says I have the "universal-darwin files" and is not showing any pending updates. EDIT: I did update my TeX installation between when it worked and now, and I'm guessing that that's why it's not working anymore.

ALSO: It seems to render just fine in Overleaf

settings.render = 16;
settings.outformat = "png";
import three; 
size(10cm,0);
currentprojection = orthographic((10,8,3));
defaultpen(fontsize(9pt));

path3 pXY=plane(O=(-.25,-.25,0),1.5X,1.5Y); label("$x_2=0$",(1,1,0)); draw(surface(pXY), gray(0.5)+opacity(.5)); draw(pXY,blue);

path3 pYZ=plane(O=(0,-.25,-.25),1.4Z,1.5Y); label(YZ*"$x_0=0$",(0,1,1),Embedded); draw(surface(pYZ), gray(0.5)+opacity(.5)); draw(pYZ,green);

path3 pXZ=plane(O=(-.25,0,-.25),1.5X,1.4Z); label(XZ*"$x_1=0$",(1,0,1),Embedded); draw(surface(pXZ), gray(0.5)+opacity(.5)); draw(pXZ,red);

Here is the output: the output from my code

Nat Kuhn
  • 676
  • 1
    Depending on your installation, some LaTeX editors allow to temporarily switch back in the LaTeX version. Of course, you could do this also manually by executing the older pdflatex version through command line... Did you try that? – Arne Sep 15 '23 at 06:55
  • 1
    try playing with the render level? What if you set render = 0? – Willie Wong Sep 15 '23 at 09:23
  • Thanks, @Arne, because my document is very large and this is just one figure, I prepared a png file from the command line, using "asy filename". The output is the same whether the format is png or pdf. I don't know anything about what the LaTeX version is or how to do that from the command line. – Nat Kuhn Sep 15 '23 at 15:05
  • Thanks, @Willie Wong. When I set render=0, it renders "correctly" but is too jagged to be useful. render at 1, 2, or 3 renders all 3 planes but also renders an extra triangle in the back... – Nat Kuhn Sep 15 '23 at 15:07
  • 1
    I see your code work well on http://asymptote.ualberta.ca/ – Black Mild Sep 15 '23 at 15:18
  • 1
    you may try to ask here also https://sourceforge.net/p/asymptote/discussion/409349 – Black Mild Sep 15 '23 at 15:20
  • Thank you, @BlackMild! Since I can download the png from the ualberta site (unlike Overleaf), this takes care of my needs. The sourceforge site says to submit bug reports to Github, so I did that. Thanks again! – Nat Kuhn Sep 15 '23 at 21:29
  • 1
    @NatKuhn: if render=0 works, try with output format PDF instead of PNG. You can then convert it to PNG using a different program. (Admittedly this is just a workaround.) – Willie Wong Sep 15 '23 at 23:44
  • 1
    This may be helpful for you https://latexdraw.com/how-to-convert-a-latex-pdf-to-png/ – Black Mild Sep 16 '23 at 03:41
  • Thanks, @WillieWong and BlackMild. I am working around by using the asymptote.ualberta.ca website, and I reported the bug on GitHub, where the sourceforge site redirected me. – Nat Kuhn Sep 19 '23 at 16:16

1 Answers1

1

This answer was posted by johncbowman on the Asymptote Github issue tracker:

MacOS doesn't support SSBOs under OpenGL, which are required for opacity. To render this example correctly, you either need to remove +opacity(.5) everywhere, use another platform, or wait for the upcoming Vulkan port of Asymptote (coming soon).

Nat Kuhn
  • 676