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);
subham soni
  • 9,673
  • 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
  • Actually, opening foo-1.asy and compiling it directly using asy renders but I am not able to see the image because it exits after executing immediately. – subham soni May 11 '14 at 12:55
  • 1
    It works fine for me with miktex, asymptote and winedt setup. Mau be something went wrong with your installation. –  May 11 '14 at 13:08
  • @subham soni: Running asy foo-1.asy should produce a file called foo-1.pdf. Open foo-1.pdf and see what it looks like. – Charles Staats May 11 '14 at 16:58
  • Nope asy foo-1.asy generates the same error :(. noticed just now @CharlesStaats – subham soni May 11 '14 at 17:14
  • Can you show the text of foo-1.asy? – Charles Staats May 12 '14 at 16:14
  • @CharlesStaats please see my edited code – subham soni May 12 '14 at 16:16
  • I saved your code to 3dintersect-1.asy and ran it, and it worked fine on my machine. Can you tell me what operating system, pdf viewer, and version of Asymptote you are using? (If you don't know the asymptote version, you can get it by running asy -version at the command line.) – Charles Staats May 12 '14 at 16:26
  • 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

1 Answers1

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).

  • Could you please look into this question and help me? https://tex.stackexchange.com/questions/429345/asymptote-non-zero-values-for-settings-render?noredirect=1#comment1075166_429345 – SKPS May 01 '18 at 11:43
  • I googled and looked at the dictionary, but still don't know what are "horizontal and vertical components of maxtiles". Could any one explain for me? – Black Mild Mar 24 '19 at 18:35
  • 1
    maxtile is an Asymptote setting. See http://asymptote.sourceforge.net/doc/Options.html#Options – Charles Staats Mar 24 '19 at 19:07