3D 渐近线中的圆弧

3D 渐近线中的圆弧

有没有比用 Asymptote 标记 3D 角度更简单的方法 这里。这种方法可行,但可能存在更简单的方法,例如

\tkzMarkAngle[label=$\alpha$,dist=0.5,arc=ll,size=0.5 cm](A,B,C)

答案1

在 3D 中绘制弧的标准 Asymptote 方法是按顺序指定中心、起点和终点。弧的半径是从中心到起点的距离。单独指定半径的工作量有点大,但我认为您可以这样做 [注意:代码未经测试。]

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

感谢 Charles 的启发。我修改了您的答案,现在它确实有效(对我来说),形式如下:

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

相关内容