This question already has an answer here:
- Asymptote: when white isn't white 2 answers
I want to use Asmptote to draw a small triangle in red inside a unit cube. Here is my code:
settings.outformat="pdf"; settings.prc = false; settings.render = 0; defaultpen(fontsize(10pt)); size(4cm,0); import three; draw(unitbox); triple p0 = (0.8,1,0); triple p1 = (1,0.8,0); triple p2 = (1,1,0.2); draw(surface(p0 -- p1 -- p2 -- cycle),red); draw(p0 -- p1 -- p2 -- cycle);
However, color of the triangle is not desired. How could I resolve it? Thanks in advance!