# How do I change properties of a cube in TikZ? [closed]

I am looking at an example from How to draw a cube with TikZ where all faces have a distinct color?

\documentclass{minimal}
\usepackage{tikz,tikz-3dplot}

\begin{document}
\tdplotsetmaincoords{70}{115}

\begin{tikzpicture}[scale=4,tdplot_main_coords]
\coordinate (O) at (0,0,0);
\tdplotsetcoord{P}{1.414213}{54.68636}{45}

\draw[fill=gray!50,fill opacity=0.5] (O) -- (Py) -- (Pyz) -- (Pz) -- cycle;
\draw[fill=blue,fill opacity=0.5] (O) -- (Px) -- (Pxy) -- (Py) -- cycle;
\draw[fill=yellow,fill opacity=0.5] (O) -- (Px) -- (Pxz) -- (Pz) -- cycle;
\draw[fill=green,fill opacity=0.5] (Pz) -- (Pyz) -- (P) -- (Pxz) -- cycle;
\draw[fill=red,fill opacity=0.5] (Px) -- (Pxy) -- (P) -- (Pxz) -- cycle;
\draw[fill=magenta,fill opacity=0.5] (Py) -- (Pxy) -- (P) -- (Pyz) -- cycle;
\end{tikzpicture}
\end{document}


I want to draw many cubes like these, I wanted to know which line changes the position of the center of the cube, and the orientation?

I want all cubes to be of same size.

what are x, y and z? are they values? are they being multiplied with P?

--------edit-----------

is there a package for TikZ where I can simply draw cubes by providing their size, color and position and orientation?

-

## closed as unclear what you're asking by Paul Gessler, Andrew Swann, Papiro, Kurt, toheczSep 2 at 11:48

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

For this kind of question it really is just best to try to change one parameter at a time and see the effect, especially since this is a small amount of code. Start with the \tdplotsetmaincoords setting and go from there. –  Peter Grill Feb 22 '13 at 7:08
@user494461 have Peter's suggestions helped you answer your question? –  Paul Gessler Aug 19 at 1:52