Asymptote 中的 3D 圆弧

Asymptote 中的 3D 圆弧

我构建了下面嵌入的技术图。我想知道如何绘制红色弧线来表示$\alpha$两个蓝色向量之间的角度。(实际上,我使用 Inkscape 添加了所需的输出。)

在此处输入图片描述

Asymptote 代码粘贴在下面。

import three;
import graph3;
size(200);

pen solid=linetype(new real[]);
pen longdashed=linetype(new real[] {10,8});
pen dashed=linetype(new real[] {3,8});

currentprojection=perspective(1/2,-1/4,1/4.4);

pen bg=gray(0.9)+opacity(0.1);
draw(surface((0,0,0.5)--(1,0,0.5)--(1,1,0.5)--(0,1,0.5)--cycle),bg);

draw((0,0,0)--(1,0,0), solid);
draw((0,0,0)--(0,1,0), longdashed);
draw((1,0,0)--(1,1,0), solid);
draw((0,1,0)--(1,1,0), longdashed);
draw((0,0,1)--(1,0,1), solid);
draw((0,0,1)--(0,1,1), solid);
draw((1,0,1)--(1,1,1), solid);
draw((0,1,1)--(1,1,1), solid);
draw((0,0,0)--(0,0,1), solid);
draw((1,0,0)--(1,0,1), solid);
draw((1,1,0)--(1,1,1), solid);
draw((0,1,0)--(0,1,1), longdashed);
draw((0.5,0,0.5)--(0.5,1,0.5));
draw((0,0.5,0.5)--(1,0.5,0.5));
draw((0,0,0)--(1,1,1),dashed);
draw((1,0,0)--(0,1,1),dashed);

// Blue vectors
draw((0.5,0.5,0.5)--(1,1,1),blue,Arrow3);
draw((0.5,0.5,0.5)--(1,0.5,0.5),blue, Arrow3);

答案1

在此处输入图片描述

将您的结尾更改MWE

// Blue vectors
guide3 v1=(0.5,0.5,0.5)--(1,0.5,0.5);
guide3 v2=(0.5,0.5,0.5)--(1,1,1);
draw(v1,blue,Arrow3);
draw(v2,blue,Arrow3);
guide3 alphaArc=arc(point(v1,0),point(v1,0.5),point(v2,0.5));
draw(alphaArc,red,Arrows3);

label("$\alpha$",alphaArc,SE);
label("$e_1$",point(v1,1),SE);
label("$e_2$",point(v2,1),SE);

相关内容