This model uses cylinders for connection, rendered in Asymptote
, cr.asy
:
size(300);
import solids;
currentprojection=orthographic (
camera=(8,5,4),
up=(0,0,1),
target=(2,2,2),
zoom=0.5
);
// save predefined 2D orientation vectors
pair NN=N;
pair SS=S;
pair EE=E;
pair WW=W;
//%points on cube
triple A = (0,0,0);
triple B = (0,0,4);
triple D = (0,4,0);
triple C = (0,4,4);
triple E = (4,0,0);
triple F = (4,0,4);
triple H = (4,4,0);
triple G = (4,4,4);
triple[] cubicCornerA={
A,C,F,H,
};
triple[] cubicCornerB={
B,D,E,G,
};
//%center of faces
triple I = (A+B+C+D)/4; //%center of face ABCD
triple J = (E+F+G+H)/4; //%center of face EFGH
triple K = (D+C+G+H)/4; //%center of face DCGH
triple L = (A+B+F+E)/4; //%center of face ABFE
triple M = (C+B+G+F)/4; //%center of face CBGF
triple N = (D+A+E+H)/4; //%center of face DAEH
triple[] faceCenter={
I,J,K,L,M,N,
};
//%connectors
triple O = (1,1,3);
triple P = (1,3,1);
triple Q = (3,1,1);
triple R = (3,3,3);
triple[] connectors={
O,P,Q,R,
};
//%place non-atom cube corners
real cornerAR=0.05;
real cornerBR=0.2;
real faceCR=0.2;
real connR=faceCR;
draw(A--B--C--D--cycle,dashed);
draw(E--F--G--H--cycle,dashed);
draw(A--E,dashed);
draw(B--F,dashed);
draw(C--G,dashed);
draw(D--H,dashed);
real cylR=0.062;
void Draw(guide3 g,pen p=currentpen){
draw(
cylinder(
point(g,0),cylR,arclength(g),point(g,1)-point(g,0)
).surface(
new pen(int i, real j){
return p;
}
)
);
}
//%connections from faces to O
pen connectPen=lightgray;
Draw(B--O,connectPen);
Draw(I--O,connectPen);
Draw(M--O,connectPen);
Draw(L--O,connectPen);
//%connections from faces to P
Draw(N--P,connectPen);
Draw(I--P,connectPen);
Draw(D--P,connectPen);
Draw(K--P,connectPen);
//%connections from faces to Q
Draw(E--Q,connectPen);
Draw(J--Q,connectPen);
Draw(N--Q,connectPen);
Draw(L--Q,connectPen);
//%connections from faces to R
Draw(G--R,connectPen);
Draw(M--R,connectPen);
Draw(J--R,connectPen);
Draw(K--R,connectPen);
void drawSpheres(triple[] C, real R, pen p=currentpen){
for(int i=0;i<C.length;++i){
draw(sphere(C[i],R).surface(
new pen(int i, real j){return p;}
)
);
}
}
drawSpheres(cubicCornerA,cornerAR,lightgray);
drawSpheres(cubicCornerB,cornerBR,darkgray);
drawSpheres(faceCenter,faceCR,red);
drawSpheres(connectors,connR,lightblue);
Process with asy -f pdf cr.asy
to get an interactive (Adobe Reader only) standalone cr.pdf
, or with asy -f pdf -noprc -render=0 cr.asy
to get an ordinary cr.pdf
, or asy -f png -render=5 cr.asy
to get a smaller raster image cr.png
.
Change the end of your MWE
to
// 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);
Best Answer
The cited example with some labels and an angle added. 3D-labels are placed with
label(<TeX-label>,<location>,<alignment>);
For example,label("$\psi$",(1,2.5,0.5),Y-Z);
defines a location point at(1,2.5,0.5)
, and a shift(0,1,-1)
, sinceY=(0,1,0)
andZ=(0,0,1)
.cr.asy
:Process with
asy -f pdf cr.asy
to get an interactive (Adobe Reader
only) standalonecr.pdf
, or withasy -f pdf -noprc -render=0 cr.asy
to get an ordinarycr.pdf
, orasy -f png -render=5 cr.asy
to get a smaller raster imagecr.png
.