使用 Asymptote 标记定向曲面

使用 Asymptote 标记定向曲面

在此处输入图片描述我正在尝试标记三维中任意向量的法线平面上的角度。我尝试将标签乘以$\omega t$XY XY() ()、XZ() 和 YZ() 的组合,但没有成功。有什么建议吗?

settings.render=6;
settings.outformat="pdf";
usepackage("bm");
// import modules
import graph3;
import three;
import solids;
// overall settings
currentprojection=orthographic(.25,.5,.1);
viewportmargin=(10,10);
size(6cm);
currentlight=((3,3,0));
// variable parameters
real r=1;
real radio=sqrt(1-(cos(pi/8))^2);
real theta1=0, theta2=112.5;
real phi1=0, phi2=65;
// axes
xaxis3("$\bm{e}_1$",0,r,black,Arrow3);
yaxis3("$\bm{e}_2$",0,r,black,Arrow3);
zaxis3("$\bm{e}_3$",0,r,black,Arrow3);

//This draws a rotated frame theta=pi/8, varphi=pi/8
triple x3=(0.3535533905932738,0.1464466094067262,0.9238795325112868);
triple x2=(-0.3826834323650898,0.9238795325112868,0);
triple x1=(0.8535533905932738,0.3535533905932738,-0.3826834323650898);
triple centro=cos(pi/8)*x3;
triple spinproyxy=(-0.8741514406663723,0.4032814824381883,0.2705980500730985);
draw(O--x2,black+dashed,Arrow3,L=Label("$\bm{e}_2'$",position=EndPoint));
draw(O--x1,black+dashed,Arrow3,L=Label("$\bm{e}_1'$",position=EndPoint));
draw(O--x3, black+dashed,Arrow3,L=Label("$\bm{e}_3'$", position=EndPoint,SE));

//Circle[![enter image description here][1]][1]
path3 mycircleB=circle(c=O,r=1,normal=x3);
draw(surface(mycircleB),gray+opacity(.3));
draw(mycircleB,black+opacity(.3));
//This draws the angle ometa t
draw(arc(c=O,x1*.2,x2*.2, normal=x3), black+linewidth(.5pt),Arrow3(TeXHead2),L=Label("XY()*$\Large\omega t$", position=MidPoint,S));

答案1

我不知道您是如何得出x1等的表达式的。在粒子数据组的标准约定中,由 形成的正交矩阵(x1,x2,x3)^T具有 混合角theta1=pi/8,这与您的评论一致,并且theta2=3*pi/8,这与您的评论几乎一致。但是,约定可能不同。无论如何,如果我引入一个减号并由 变换,XY()rotate(22.5,Y)*rotate(-22.5,Z)会得到一个看起来合理的结果。这个减号可能是约定问题。或者,更有可能的是,可能会有更好的旋转参数。如果您提供有关如何计算 的更多详细信息,那将有很大帮助(x1,x2,x3)

\documentclass{standalone}
\usepackage{asypictureB}
\standaloneenv{asypicture}
\begin{document}
\begin{asypicture}{name=disc}
settings.outformat = "pdf";
settings.prc = false;
settings.render = 0;
usepackage("bm");
// import modules
import graph3;
import three;
import solids;
// overall settings
currentprojection=orthographic(.25,.5,.1);
viewportmargin=(10,10);
size(6cm);
currentlight=((3,3,0));
// variable parameters
real r=1;
real radio=sqrt(1-(cos(pi/8))^2);
real theta1=0, theta2=112.5;
real phi1=0, phi2=65;
// axes
xaxis3("$\bm{e}_1$",0,r,black,Arrow3);
yaxis3("$\bm{e}_2$",0,r,black,Arrow3);
zaxis3("$\bm{e}_3$",0,r,black,Arrow3);

//This draws a rotated frame theta=pi/8, varphi=pi/8
triple x3=(0.3535533905932738,0.1464466094067262,0.9238795325112868);
triple x2=(-0.3826834323650898,0.9238795325112868,0);
triple x1=(0.8535533905932738,0.3535533905932738,-0.3826834323650898);
triple centro=cos(pi/8)*x3;
triple spinproyxy=(-0.8741514406663723,0.4032814824381883,0.2705980500730985);
draw(O--x2,black+dashed,Arrow3,L=Label("$\bm{e}_2'$",position=EndPoint));
draw(O--x1,black+dashed,Arrow3,L=Label("$\bm{e}_1'$",position=EndPoint));
draw(O--x3, black+dashed,Arrow3,L=Label("$\bm{e}_3'$", position=EndPoint,SE));

//Circle
path3 mycircleB=circle(c=O,r=1,normal=x3);
draw(surface(mycircleB),gray+opacity(.3));
draw(mycircleB,black+opacity(.3));
//This draws the angle omega t
draw(arc(c=O,x1*.2,x2*.2, normal=x3), black+linewidth(.5pt),Arrow3(TeXHead2), 
L=Label(rotate(22.5,Y)*rotate(-22.5,Z)*XY()*"$\Large\omega t$", position=MidPoint,S));
\end{asypicture}
\end{document}

在此处输入图片描述

相关内容