1

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)
1
  • > Hello Guys asy unitcircle size(10cm,0)
    – user221871
    Aug 5, 2020 at 15:26

2 Answers 2

2

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));
2

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .