Is there any easier way to label angles in 3D with Asymptote then described here. That way works, but probably there exists something easier like
\tkzMarkAngle[label=$\alpha$,dist=0.5,arc=ll,size=0.5 cm](A,B,C)
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityIs there any easier way to label angles in 3D with Asymptote then described here. That way works, but probably there exists something easier like
\tkzMarkAngle[label=$\alpha$,dist=0.5,arc=ll,size=0.5 cm](A,B,C)
The standard Asymptote way to draw an arc in 3d is to specify the center, starting point, and ending point, in that order. The radius of the arc is the distance from the center to the starting point. Specifying the radius independently is a bit more work, but I think you can do something like this [NOTE: Code not tested.]
import three;
// \vdots
// Define function: given radius, A, B, C
// returns arc in angle ABC with specified radius
path anglearc(real radius, triple A, triple B, triple C) {
triple center = B;
triple start = B + radius * unit(A-B)
return arc(center, start, C);
}
// Now, use the function to label an angle:
draw(anglearc(0.5, X, O, Y), L=Label("$\alpha$", align=SW));
Thanks Charles for inspiration. I have modified your answer and now it really works (for me) in the form:
path3 anglearc(real radius, triple A, triple B, triple C)
{
triple center = B;
triple start = B + radius * unit(A-B);
return arc(center, start, C,cross(A-B, C-B),CCW);
}
draw(anglearc(0.5, A, B, C), L=Label("$\alpha$", align=SW));