- Rotate/align the figure in three dimensions
- Position the picture relative another figure/picture in the same float
Code: Select all
\newcommand{\AtomOne}[1]{%
\shade[ball color=green!20,fill opacity=0.5] (#1) circle (0.5);\draw (#1);
}
\newcommand{\AtomTwo}[1]{%
\shade[ball color=blue!20,fill opacity=0.5] (#1) circle (0.5);\draw (#1);
}
\newcommand{\AtomThree}[1]{%
\shade[ball color=yellow!20,fill opacity=0.5] (#1) circle (1);\draw (#1);
}
\newcommand{\UnitCell}{%
\draw [color=gray!25](0,0,10)--(0,0,0)--(0,10,0)
(0,0,0)--(10,0,0)--(10,10,0)--(10,10,10)--(10,0,10)--(10,0,0)%
(10,10,10)--(0,10,10)--(0,10,0)
(10,10,0)--(0,10,0) (10,0,10)--(0,0,10)--(0,10,10);
\draw [red,very thick] (10,10,10)--(7.5,7.5,7.5)--(10,5,5)(5,5,10)--(7.5,7.5,7.5)--(5,10,5)
(5,10,5)--(2.5,7.5,2.5)--(0,10,0)(5,5,0)--(2.5,7.5,2.5)--(0,5,5)
(0,0,10)--(2.5,2.5,7.5)--(5,5,10)(5,0,5)--(2.5,2.5,7.5)--(0,5,5)
(10,0,0)--(7.5,2.5,2.5)--(10,5,5)(5,0,5)--(7.5,2.5,2.5)--(10,5,5);
%\draw (10,0,0) node {X};
%\draw (0,10,0) node {Y};
%\draw (0,0,10) node {Z};
\AtomOne{0,10,0}
\AtomOne{0,10,10}
\AtomOne{0,0,0}
\AtomOne{0,0,10}
\AtomOne{0,5,5}
\AtomOne{5,5,0}
\AtomOne{5,0,5}
\AtomOne{10,0,0}
\AtomOne{10,0,10}
\AtomOne{10,10,10}
\AtomOne{10,10,0}
\AtomOne{10,5,5}
\AtomOne{5,10,5}
\AtomOne{5,5,10}
\AtomTwo{2.5,7.5,2.5}
\AtomTwo{2.5,2.5,7.5}
\AtomTwo{7.5,2.5,2.5}
\AtomTwo{7.5,7.5,7.5}
}
\begin{tikzpicture}[scale=.25]
\UnitCell{0,0,0}
\end{tikzpicture}