8

After successful installation of Asymptote, when I execute a sample file why are there horizontal lines in the image (with pdflatex) but if I make it as a separate asy file and execute asy file.asy with settings.outformat="pdf" It is rendered well. What is the issue? Here is the tex source code:

\documentclass{standalone}
\usepackage{asymptote}

\begin{document}

\begin{asy}[width=10cm,height=10cm]
settings.prc=false;
import three;
draw(unitsphere);
\end{asy}

\end{document} 

enter image description here

The foo-1.asy code:

if(!settings.multipleView) settings.batchView=false;
settings.tex="pdflatex";
defaultfilename="3dintersect-1";
if(settings.render < 0) settings.render=4;
settings.outformat="";
settings.inlineimage=true;
settings.embed=true;
settings.toolbar=false;
viewportmargin=(2,2);


settings.prc=false;
import three;
draw(unitsphere);
size(284.52756pt,284.52756pt,keepAspect=true);
  • 1
    This looks like a bug somewhere; it compiles fine for me. I have two suggestions: 1) If your tex file is named foo.tex, try opening foo-1.asy and compiling it directly using asy. If the problem shows up there, then post the code for foo-1.asy; if not, it's a problem with the asymptote package. 2) This is a good time to be posting on the Asymptote help forum, as John Bowman (one of the creators) is actively trying to iron out bugs and irregularities. – Charles Staats May 11 '14 at 12:40
  • @CharlesStaats can you come for a chat – subham soni May 11 '14 at 12:49
  • Maybe later; my day is about to start. – Charles Staats May 11 '14 at 12:52
  • 1
    It works fine for me with miktex, asymptote and winedt setup. Mau be something went wrong with your installation. – user11232 May 11 '14 at 13:08
  • 1
    This may be a graphic card driver issue. I used to get some of these some times ago (linux support for some cards is rather poor). – cjorssen May 12 '14 at 19:42
7

I just came across the following lines in the manual, which seem to address your issue.

High resolution rendering is done by tiling the image. If your graphics card allows it, the rendering can be made more efficient by increasing the maximum tile size maxtile to your screen dimensions (indicated by maxtile=(0,0). If your video card generates unwanted black stripes in the output, try setting the horizontal and vertical components of maxtiles to something less than your screen dimensions.

[emphasis added]

For context, this is found in the description of the three module. It's listing the four ways of viewing 3d Asymptote output; this is in number 2 (using settings.render = n; to produce rasterized output).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.