同时变换多个渐近线曲面?

同时变换多个渐近线曲面?

有没有办法asymptote将两个表面结合起来,以便我可以同时变换它们?例如,下面我想说surface r = cp+cm;,然后做,r=rotate(45,Y)*r;而不是分别旋转两个表面。

% To run: pdflatex --shell-escape filename.tex
\documentclass{standalone}
\usepackage{asypictureB}

\begin{document}
\begin{asypicture}{name=RotateTwo}
settings.outformat="png";
settings.prc=false;
settings.render=10;

import three;
//Setup View
size(200);
currentprojection=orthographic(1,-3,2);

//Draw Axes
pen thickblack = black+0.75;
real axislength = 2.0;
draw(L=Label("$x$", position=Relative(1.1), align=SW), -axislength*X--axislength*X,thickblack, Arrow3); 
draw(L=Label("$y$", position=Relative(1.1), align=E), -axislength*Y--axislength*Y,thickblack, Arrow3); 
draw(L=Label("$z$", position=Relative(1.1), align=N), -2*axislength*Z--2*axislength*Z,thickblack, Arrow3); 

//Define cube surfaces
surface c1 = shift(-0.5X-0.5Y-0.5Z)*unitcube;
c1 = zscale3(0.1)*c1;
surface cm = shift(-0.25Z)*c1;
surface cp = shift(+0.25Z)*c1;
surface rm = rotate(45,Y)*cm;
surface rp = rotate(45,Y)*cp;
//I'd like to just do rotate(45,Y)*(cp+cm)

//Draw cube surfaces
draw(rm,palegrey);
draw(rp,palegrey);
\end{asypicture}

\end{document}

答案1

surface结构允许连接表面surface(s1,s2,s3,...)。在您的案例中

surface ccp=rotate(45,Y)*surface(cm,cp);

奥格

相关内容