Asymptote inconsistently draws the following figure depending on what draw commands are commented out.
import graph3;
size(200,200,IgnoreAspect);
currentprojection=orthographic(7.2,-5.1,8);
defaultrender.merge=true;
// draw #1
draw((0,1,0)--(2,1,4)--(2,0,0)--cycle,rgb(.3,.3,.3)+linewidth(2));
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?