Asymptote inconsistently draws the following figure depending on what draw commands are commented out.

import graph3;

// draw #1

path3 p1=(1,0,0)--(1,2,0)--(3,2,0)--(3,0,0);
// draw #2
draw(surface(p1 -- cycle), emissive(gray+opacity(.6)));

path3 p2=(0,1,0)--(2,1,4)--(2,0,0);
draw(surface(p2 -- cycle), emissive(gray+opacity(.6)));

path3 p3=(2,0,0)--(2,1,4)--(2,1,0);
draw(surface(p3 -- cycle), emissive(gray+opacity(.6)));

As is, parts of 3 planes and a closed path in space is drawn. The planes are drawn in a light gray color.

If the draw command after draw #2 is commented out, the two remaining planes are now drawn in black.

If the both draw commands after draw #1 and draw #2 are commented out, nothing is drawn.

This behavior is exhibited when I use the default Asymptote viewer and when I create a .pdf.

My default render options: -tex "latex" -V -render=-1.

My .pdf render options: -f pdf -render=-3 -noView -noprc -antialias 2 -tex "xelatex"

I'm using Asymptote 2.41, Ghostscript 9.21.

Can anyone explain this behavior?

  • Generally speaking, Asymptote does not handle 3d transparency very well unless render=0. Sep 27, 2017 at 20:57

1 Answer 1


When I run your 3 versions of the code and view it in Adobe Acrobat Reader or SumatraPDF I see the following images. I used all your render options with Asymptote 2.38 and Ghostscript 9.19. I know this doesn't directly answer your question, but maybe it will help.

enter image description here enter image description here enter image description here

  • Thanks. Knowing my Windows machine, it's probably "just me."
    – GregH
    Sep 27, 2017 at 15:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .