帮我解决渐近线中的 3D 弧。非常感谢!代码:
\begin{asy}
settings.outformat="pdf";
import three;
size(7.5cm,0);
currentprojection=perspective(20,18,8);
currentlight=light(8,10,2);
path3 p=(-1,-1,0)--(1,-1,0)--(1,1,0)--(-1,1,0)--cycle;
draw(p);
path3 g=(1,0,0)..(0,1,1)..(-1,0,0)..(0,-1,1)..cycle;
draw(g,2bp+.8red);
draw(surface(g),paleblue);
dot(g,5bp+.8green);
draw((0,0,0)--normal(p),1bp+blue,Arrow3());
\end{asy}
答案1
我编译了
\documentclass[border=3.14mm]{standalone}
\usepackage{asymptote}
\begin{document}
\begin{asy}
settings.outformat="pdf";
import three;
size(7.5cm,0);
currentprojection=perspective(20,18,8);
currentlight=light(8,10,2);
path3 p=(-1,-1,0)--(1,-1,0)--(1,1,0)--(-1,1,0)--cycle;
draw(p);
path3 g=(1,0,0)..(0,1,1)..(-1,0,0)..(0,-1,1)..cycle;
draw(g,2bp+.8red);
draw(surface(g),paleblue);
dot(g,5bp+.8green);
draw((0,0,0)--normal(p),1bp+blue,Arrow3());
\end{asy}
\end{document}
使用通常的链条pdflatex
,然后asy
又一次pdflatex
,我得到了一个完美的
不过,我更喜欢使用asypictureB
,当我编译时
\documentclass[border=3.14mm]{standalone}
\usepackage{asypictureB}
\begin{document}
\begin{asypicture}{name=pfft}
settings.outformat="pdf";
import three;
size(7.5cm,0);
currentprojection=perspective(20,18,8);
currentlight=light(8,10,2);
path3 p=(-1,-1,0)--(1,-1,0)--(1,1,0)--(-1,1,0)--cycle;
draw(p);
path3 g=(1,0,0)..(0,1,1)..(-1,0,0)..(0,-1,1)..cycle;
draw(g,2bp+.8red);
draw(surface(g),paleblue);
dot(g,5bp+.8green);
draw((0,0,0)--normal(p),1bp+blue,Arrow3());
\end{asypicture}
\end{document}
和
pdflatex -shell-escape
我也得到了这个结果。请检查使用这些标准方法得到的结果。如果您得到相同的结果,请详细描述您的操作,即向我们提供一个完整的示例,该示例以 开头\documentclass
并以 结尾\end{document}
,以便我们重现该问题。
答案2
完整代码:
\documentclass[border=5mm]{standalone}
\usepackage{asymptote}
\begin{document}
\begin{asy}
settings.outformat="pdf";
import three;
size(7.5cm,0);
currentprojection=perspective(20,18,8);
currentlight=light(8,10,2);
path3 p=(-1,-1,0)--(1,-1,0)--(1,1,0)--(-1,1,0)--cycle;
draw(p);
path3 g=(1,0,0)..(0,1,1)..(-1,0,0)..(0,-1,1)..cycle;
draw(g,2bp+.8red);
draw(surface(g),paleblue);
dot(g,5bp+.8green);
draw((0,0,0)--normal(p),1bp+blue,Arrow3());
\end{asy}
\end{document}