1

I don't need the interactive 3D view because it will be viewed on papers. I just want to draw vector graphics 3D objects.

For the following code, it seems that Asymptote rasterizes the output. Is there any method to avoid this? I am using pdflatex->asy->pdflatex sequence.

\documentclass[varwidth]{standalone}
\usepackage{asymptote}
\begin{document}
\begin{asy}
import three;
currentprojection=orthographic(5,4,2,center=true);
size(5cm);
size3(3cm,5cm,8cm);
draw(unitbox);
dot(unitbox,red);
label("$O$",(0,0,0),NW);
label("(1,0,0)",(1,0,0),S);
label("(0,1,0)",(0,1,0),E);
label("(0,0,1)",(0,0,1),Z);
\end{asy}
\end{document}

enter image description here

I tried this info but it does not seem to work.

Edit

\documentclass[varwidth]{standalone}
\usepackage{asymptote}
\begin{document}
\begin{asy}
settings.interactiveView=false;
settings.batchView=false;
settings.render=0;
import three;
currentprojection=orthographic(5,4,2,center=true);
size(5cm);
size3(3cm,5cm,8cm);
draw(unitbox);
dot(unitbox,red);
label("$O$",(0,0,0),NW);
label("(1,0,0)",(1,0,0),S);
label("(0,1,0)",(0,1,0),E);
label("(0,0,1)",(0,0,1),Z);
\end{asy}
\end{document}

I still get the interactive 3D view.

  • strangely once the 3D view is activated in Acrobat Reader, the edges do not look rasterized anymore (tested at 3200% magnification) – user4686 Dec 17 '18 at 10:53
  • I guess you are looking for this answer. – user121799 Dec 17 '18 at 11:51
  • 1
    another potential duplicate: tex.stackexchange.com/questions/9210/… – AlexG Dec 17 '18 at 11:56
  • @ArtificialStupidity I do not know what you want to achieve nor why asymptote is written as it is written, but according to the answer you can get vector graphics with settings.render=0;. – user121799 Dec 17 '18 at 11:56
  • You probably just did not overwrite the old file when you "still get the interactive 3D view". Can you try creating a completely new file such that asymptote is not tempted to just use the old one? (This is one of the reasons why I use asypictureB.) – user121799 Dec 17 '18 at 12:02
1

Quoting Charles Staats III excellent Asymptote tutorial (p. 52),

By default, when Asymptote does 3d stuff and outputs a pdf file, the 3d information will be embedded in the pdf file as prc data.This means that if the pdf file is viewed using Adobe Reader, it will be possible to rotate the image interactively.

What you are most likely looking for is the settings.prc option. Simply set it to false by using

settings.prc = false;

and you should get rid of the interactive 3D view.

|improve this answer|||||

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.