I have this strange issue with 3d asymptote diagrams. Without labels they act as a normal figure
, but when I add label, the diagram moves to the edge off the page...
MWE:
\documentclass[12pt,a4paper,addpoints]{exam}
\usepackage{asymptote}
\begin{document}
\begin{figure}
\begin{asy}
import solids;
import three;
size(5cm);
currentprojection=orthographic(0,-5,3);
triple start = (0,0,1);
real length = 5;
real radius = 1;
triple ax = (0,0,1);
revolution r = cylinder(start,radius,length,ax);
draw(r,black);
revolution downcone=cone(Z,1,-3);
draw (downcone,black);
draw((-1,0,7)--(1,0,7),Arrows3);
draw((1.5,0,1)--(1.5,0,6),Arrows3);
draw((1.5,0,1)--(1.5,0,-2),Arrows3);
\end{asy}
%label("2m",(0,0,7),N);
%label("5m",(1.5,0,3.5),E);
%label("3m",(1.5,0,-0.5),E)
\caption{Graansilo}
\end{figure}
\end{document}
When I add the commented label
lines to the asy
-environment, things start to go wrong... the diagram is no longer centered (or at least in the visible area of the page), but moves to the edge...
When trying with multiple diagrams on a page, they even appear on top of each other...
I tried altering the label
-lines (adding $
, numbers only, letters only), tried changing the perspective.
still no clue...
compiling .asy gives 'illegal token "\"', but that's all i have...