Is there a way with asymptote
to combine two surfaces, so so that I can transform both simultaneously? E.g., below I would like to say surface r = cp+cm;
, then do r=rotate(45,Y)*r;
instead of separately rotating both surfaces.
% 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}