1

I would like to write a text along a circumference with Asymptote's module labelpath3. Below there is the code:

size(200);
import labelpath3;
path3 g = shift(-Z)*unitcircle3;
string txt = "Orizzonte";
draw (g,1bp+red);
draw(labelpath(txt,g,angle=180,optional=rotate(-70,X)*Z));

I just started using Asymptote, the code above I saw it in the Asymptote tutorials. This code write a text too big. If I multiply the argument txt in labelpath for scale(0.2) the terminal show me the message:

cannot call surface labelpath(string s, path3 p, real angle, triple optional)
with parameters:
(label,path3,int angle, triple optional)

Why?

  • Welcome to TeX.SE! For scaling of 3D objects you need to use scale3 instead of scale. – user121799 Apr 15 '18 at 18:43
  • I saw that you posted a comment as an answer. However, I do not understand your comment. 180 degrees also works with my code. And with texdoc asymptote you get nice manual. – user121799 May 16 '18 at 14:44
1

I could only guess what you want. You need to use scale3 instead of scale. And if you just want to put text on a part of the path, according to the examples on this site you need to use subpath.

enter image description here

\documentclass{standalone}
\usepackage{asypictureB}
\begin{document}
\begin{asypicture}{name=AsyPlot}
size(200);
import labelpath3;
path3 g = scale3(0.1)*shift(-Z)*unitcircle3;
string txt = "Orizzonte";
draw (g,1bp+red);
draw(rotate(-40,Z)*labelpath(txt,subpath(g,0,reltime(g,0.4)),angle=-90,optional=rotate(-70,X)*Z));
\end{asypicture} 
\end{document}
|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.