I'm trying to make the followng Central Composite Design with tikz.
Desired Result
My MWE with output is:
Code
\documentclass[tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}[scale=4,fill opacity=0.4,thick,
line cap=round,line join=round]
%% Define coordinate labels.
% t(op) and b(ottom) layers
\path \foreach \layer/\direction in {b/{0,0,0},t/{0,1,0}} {
(\direction)
\foreach \point/\label in {{0,0,0}/ll,{1,0,0}/lr,{1,0,-1}/ur,{0,0,-1}/ul} {
+(\point) coordinate (\layer\label)
}
($(\layer ll)!0.5!(\layer ur)$) coordinate (\layer md)
};
% Put text next to the labels as requested.
% Funilly enough we need to set fill opacity to 1.
% Draw left cube.
\fill (0, 0,-1) circle (0.5pt);
\foreach \direction in {(0,0,1),(0,1,0),(1,0,0)} {
\draw[dashed,black] (bul) -- + \direction;
}
\draw (bll) -- (blr) -- (tlr) -- (tll) -- cycle;
\draw (blr) -- (bur) -- (tur) -- (tlr) -- cycle;
\draw (tll) -- (tlr) -- (tur) -- (tul) -- cycle;
\foreach \point in {bul, bll, blr, bur, tll, tlr, tul, tur} {
\fill[fill opacity=1] (\point) circle (0.75pt);
}
\draw (1.5, 0, -1) -- (0, 0,-2);
\end{tikzpicture}
\end{document}
Output
I've difficulty in drawing vertices. Any help will be highly appreciate. Thanks in advance.