\tdplotsetmaincoords{30}{30}
\begin{tikzpicture}[scale=5,tdplot_main_coords]
\def\x{1};
\def\y{1};
\def\z{1};
\coordinate (O) at (\x,\y,\z);
\tdplotsetcoord{P}{1.414213}{54.68636}{45}
\draw[fill=gray!50,fill opacity=0.5] (\x,\y,\z) -- ((\x,\y,\z)+Py) -- ((\x,\y,\z)+Pyz) -- ((\x,\y,\z)+Pz) -- cycle;
% \draw[fill=blue,fill opacity=0.5] (O) -- (Px) -- (Pxy) -- (Py) -- cycle;
% \draw[fill=green,fill opacity=0.5] (O) -- (Px) -- (Pxz) -- (Pz) -- cycle;
% \draw[fill=yellow,fill opacity=0.5] (Pz) -- (Pyz) -- (P) -- (Pxz) -- cycle;
%\draw[fill=red,fill opacity=0.5] (Px) -- (Pxy) -- (P) -- (Pxz) -- cycle;
%\draw[fill=pink,fill opacity=0.5] (Py) -- (Pxy) -- (P) -- (Pyz) -- cycle;
\end{tikzpicture}
How can I translate every projection of P by ((\x,\y,\z) ?
\usetikzlibrary{calc}to your preamble, then you can do coordinate calculations with($(\x,\y,\z)+(\Px,\Py,\Pz)$). But you need to first get values of\Px,\Py,\Pyz. – Peter Grill Feb 22 at 8:08