0

I've followed the accepted answer to this question to invoke Asymptote in an environment without GUI using the -offscreen option. But it fails on this file:

texpreamble("
    \newcommand{\definiteintegral}[4]{\int_{#1}^{#2}\,#3\,d#4}
    \newcommand{\myequation}[2]{#1\amp =#2}
    \newcommand{\indefiniteintegral}[2]{\int#1\,d#2}
    \newcommand{\testingescapedpercent}{ \% }
    \newcommand{\lt}{<}
    \newcommand{\gt}{>}
    \newcommand{\amp}{&}
");


// Riemann surface of z^{1/n}
import graph3;
import palette;

int n=3;
size(200,300,keepAspect=false);
currentprojection=orthographic(10,10,5);
currentlight=(10,10,5);
triple f(pair t) {return (t.x*cos(t.y),t.x*sin(t.y),t.x^(1/n)*sin(t.y/n));}

surface s=surface(f,(0,0),(1,2pi*n),8,16,Spline);
s.colors(palette(s.map(zpart),Rainbow()));

draw(s,meshpen=black,render(merge=true));

The last two lines of the verbose output are:

Offscreen context settings: Depth=0 Stencil=0 Accum=0
Error initializing offscreen context: Depth=0
2
  • I used the -offscreen option. Sorry to omit this detail. I've edited the original post to include it.
    – Dave R
    May 11, 2018 at 3:32
  • Sorry if it does not help you but on my system (Debian 64 bits, Asy V2.42-40) asy -offscreen works. Perhaps a driver/library problem. For what kind of file the option -offscreen works on your system ? Perhaps ask for the question on asy forum.
    – O.G.
    May 24, 2018 at 14:23

0

You must log in to answer this question.

Browse other questions tagged .