Can I draw this same exact picture(from Draw realistic 3D crystal structures (diamond)) using tikz in latex?
This is what I got till now.
from the code:
\begin{tikzpicture}
\tdplotsetmaincoords{0}{60}{140}
\pgfmathsetmacro{\d}{2.5}
\draw[] (0,0,0) -- (4*\d,0,0) -- (4*\d,4*\d,0) -- (0,4*\d,0) -- (0,0,0);
\draw[] (0,0,4*\d) -- (4*\d,0,4*\d) -- (4*\d,4*\d,4*\d) -- (0,4*\d,4*\d) -- (0,0,4*\d);
\draw[] (0,0,4*\d) -- (4*\d,0,4*\d) -- (4*\d,0,0) -- (0,0,0) -- (0,0,4*\d);
\draw[] (0,4*\d,4*\d) -- (4*\d,4*\d,4*\d) -- (4*\d,4*\d,0) -- (0,4*\d,0) -- (0,4*\d,4*\d);
\coordinate (Aa) at (0,0,0);
\coordinate (Ab) at (4*\d,0,0);
\coordinate (Ac) at (0,4*\d,0);
\coordinate (Ad) at (4*\d,4*\d,0);
\coordinate (Ae) at (2*\d,2*\d,0);
\coordinate (Ba) at (\d,\d,\d);
\coordinate (Bb) at (3*\d,3*\d,\d);
\coordinate (Ca) at (2*\d,0,2*\d);
\coordinate (Cb) at (0,2*\d,2*\d);
\coordinate (Cc) at (4*\d,2*\d,2*\d);
\coordinate (Cd) at (2*\d,4*\d,2*\d);
\coordinate (Da) at (3*\d,\d,3*\d);
\coordinate (Db) at (\d,3*\d,3*\d);
\coordinate (Ea) at (0,0,4*\d);
\coordinate (Eb) at (4*\d,0,4*\d);
\coordinate (Ec) at (0,4*\d,4*\d);
\coordinate (Ed) at (4*\d,4*\d,4*\d);
\coordinate (Ee) at (2*\d,2*\d,4*\d);
\begin{scope}[line width=10,shade,shading angle=30]
\draw[] (Ba) -- (Aa);
\draw[] (Ba) -- (Ae);
\draw[] (Bb) -- (Ae);
\draw[] (Bb) -- (Ad);
\draw[] (Ba) -- (Ca);
\draw[] (Bb) -- (Cc);
\draw[] (Bb) -- (Cd);
\draw[] (Da) -- (Ca);
\draw[] (Da) -- (Cc);
\draw[] (Db) -- (Cb);
\draw[] (Db) -- (Cd);
\draw[] (Da) -- (Eb);
\draw[] (Da) -- (Ee);
\draw[] (Db) -- (Ee);
\draw[] (Db) -- (Ec);
\end{scope}
\node[draw,circle,minimum size=1cm,shading=ball] at (Aa) {};
\node[draw,circle,minimum size=1cm,shading=ball] at (Ab) {};
\node[draw,circle,minimum size=1cm,shading=ball] at (Ac) {};
\node[draw,circle,minimum size=1cm,shading=ball] at (Ad) {};
\node[draw,circle,minimum size=1cm,shading=ball] at (Ae) {};
\node[draw,circle,minimum size=1cm,shading=ball] at (Ba) {};
\node[draw,circle,minimum size=1cm,shading=ball] at (Bb) {};
\node[draw,circle,minimum size=1cm,shading=ball] at (Ca) {};
\node[draw,circle,minimum size=1cm,shading=ball] at (Cb) {};
\node[draw,circle,minimum size=1cm,shading=ball] at (Cc) {};
\node[draw,circle,minimum size=1cm,shading=ball] at (Cd) {};
\node[draw,circle,minimum size=1cm,shading=ball] at (Da) {};
\node[draw,circle,minimum size=1cm,shading=ball] at (Db) {};
\node[draw,circle,minimum size=1cm,shading=ball] at (Ea) {};
\node[draw,circle,minimum size=1cm,shading=ball] at (Eb) {};
\node[draw,circle,minimum size=1cm,shading=ball] at (Ec) {};
\node[draw,circle,minimum size=1cm,shading=ball] at (Ed) {};
\node[draw,circle,minimum size=1cm,shading=ball] at (Ee) {};
\end{tikzpicture}



\includegraphicto include pdf figure generated by Asymptote code in here https://tex.stackexchange.com/a/155242/140722 ? – Black Mild Aug 25 '22 at 04:00\coordinate (Aa) at (0,0,0);, the 3D tuple is calculated into 2D screen coordinates and that is what is stored in(Aa). -so all information about where(Aa)really is in 3D is lost. To create a connecting rod one would like to draw it from ball surface to ball surface, instead of from center to center. -but these informations are lost. – hpekristiansen Aug 25 '22 at 13:12tikz-3dis still just TikZ. It can help with many 3D coordinate transformation. -but is does not solve the problem with surfaces in 3d, the z-buffer problem and the loss of the 3D coordinate informations. Maybe someone mere experienced than me can figure out a way to fake it all by e.g. by calculating the order in which 2D figures needs to be drawn and how they need to look like. – hpekristiansen Aug 25 '22 at 13:34