Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
     \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) ?

share|improve this question
If you add \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

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.