Imagem de cubos e tikz

Imagem de cubos e tikz

Eu tenho um gráfico que contém alguns cubos. Mas existem alguns erros que não consegui resolver, além disso 1-Como adicionar cor aos cubos? 2-Como a figura pode ser centralizada? 3-Como anexar número e legenda à figura? 4-Como as setas podem ser afogadas em linhas pontilhadas?

Eu adicionei meus comandos no seguinte:

\documentclass[reqno]{amsart}
\usepackage{subfigure}
\usepackage{amsfonts}
%\usepackage{xy}
\usepackage{newlfont}
\usepackage[centertags]{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
%\usepackage{qsymbols}
\usepackage{graphicx}
\usepackage{plain}
\usepackage{mathrsfs}
\usepackage{makecell}
\usepackage{enumerate}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\usetikzlibrary{calc}

 \setcounter{page}{1}
\renewcommand{\baselinestretch}{1.5}
\oddsidemargin=.25cm \evensidemargin=.25cm \textwidth=15cm
\topmargin=0cm \textheight=21cm
%\textwidth= \textheight=
\theoremstyle{definition}
\newtheorem{theorem}{Theorem.}[section]
\newtheorem{lemma}[theorem]{Lemma.}
\newtheorem{proposition}[theorem]{Proposition.}
\newtheorem{corollary}[theorem]{Corollary.}

 \newtheorem{definition}[theorem]{Definition.}
\newtheorem{example}[theorem]{Example.}
\newtheorem{remark}[theorem]{Remark.}
\begin{document}


\tdplotsetmaincoords{80}{125} %perspective angles

 \begin{tikzpicture}[t][tdplot_main_coords]

 \coordinate (o) at (0,0,0);

 %\draw[dshed] (o) -- (4,0,0);
%\draw[dshed] (o) -- (0,8,0);
%\draw[dshed] (o) -- (0,0,4);
%draw the top and the bottom of the cube
%\draw[fil1=blue!5] (o) -- (0,2,0) -- (2,2,0) -- (2,0,0) -- cycle;
%\draw[fil1=red!5] (o) -- (0,2,0) -- (0,2,2) -- (0,0,2) -- cycle;
%\draw[fil1=red!5] (o) -- (0,0,2) -- (2,0,2) -- (2,0,0) -- cycle;

 \draw[fil1=blue!5] (0,0,2) -- (0,2,2) -- (2,2,2) -- (2,0,2) -- cycle;
\draw[fil1=blue!5] (2,0,0) -- (2,0,2) -- (2,2,2) -- (2,2,0) -- cycle;
\draw[fil1=blue!5] (0,2,2) -- (0,2,0) -- (2,2,0) -- (2,2,2) -- cycle;
\node (A) at (0.68,0.68,1) {\Huge H};
\draw[very thick, ->] (2,1,1) -- node[midway,above]{$\dfrac{dN}{dt}$}(3.6,1,1);

 \draw[fil1=yellow!5] (4,2,2) -- (4,2,0) -- (6,2,0) -- (6,2,2) -- cycle;
\draw[fil1=yellow!5] (6,0,0) -- (6,0,2) -- (6,2,2) -- (6,2,0) -- cycle;
\draw[fil1=yellow!5] (6,0,2) -- (4,0,2) -- (4,2,2) -- (6,2,2) -- cycle;
\draw[very thick, ->] (6,1,1) -- node[midway,above]{$\dfrac{dR}{dt}$}(7.6,1,1);
\node (A) at (4.68,0.68,1) {\Huge N};

 \draw[fil1=red!5] (8,2,2) -- (8,2,0) -- (10,2,0) -- (10,2,2) -- cycle;
\draw[fil1=red!5] (10,0,0) -- (10,0,2) -- (10,2,2) -- (10,2,0) -- cycle;
\draw[fil1=red!5] (10,0,2) -- (8,0,2) -- (8,2,2) -- (10,2,2) -- cycle;
\node (A) at (8.68,0.68,1) {\Huge R};
\end{tikzpicture}



 \end{document}

Obrigado

Responder1

Como desejado, aqui estão meus comentários convertidos em uma resposta:

\documentclass[reqno]{amsart}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\usetikzlibrary{calc}
%
\setcounter{page}{1}
\renewcommand{\baselinestretch}{1.5}
\oddsidemargin=.25cm \evensidemargin=.25cm \textwidth=15cm
\topmargin=0cm \textheight=21cm
%
\begin{document}
%
\tdplotsetmaincoords{80}{125} %perspective angles
%
\begin{figure}%
    \centering
    \begin{tikzpicture}[tdplot_main_coords]
        %
        \coordinate (o) at (0,0,0);
        %
        \draw[fill=blue!5] (0,0,2) -- (0,2,2) -- (2,2,2) -- (2,0,2) -- cycle;
        \draw[fill=blue!5] (2,0,0) -- (2,0,2) -- (2,2,2) -- (2,2,0) -- cycle;
        \draw[fill=blue!5] (0,2,2) -- (0,2,0) -- (2,2,0) -- (2,2,2) -- cycle;
        \node (A) at (0.68,0.68,1) {\Huge H};
        \draw[very thick, dotted, ->] (2,1,1) -- node[midway,above]{$\dfrac{dN}{dt}$}(3.6,1,1);
        %
        \draw[fill=yellow!5] (4,2,2) -- (4,2,0) -- (6,2,0) -- (6,2,2) -- cycle;
        \draw[fill=yellow!5] (6,0,0) -- (6,0,2) -- (6,2,2) -- (6,2,0) -- cycle;
        \draw[fill=yellow!5] (6,0,2) -- (4,0,2) -- (4,2,2) -- (6,2,2) -- cycle;
        \draw[very thick, dotted, ->] (6,1,1) -- node[midway,above]{$\dfrac{dR}{dt}$}(7.6,1,1);
        \node (A) at (4.68,0.68,1) {\Huge N};
        %
        \draw[fill=red!5] (8,2,2) -- (8,2,0) -- (10,2,0) -- (10,2,2) -- cycle;
        \draw[fill=red!5] (10,0,0) -- (10,0,2) -- (10,2,2) -- (10,2,0) -- cycle;
        \draw[fill=red!5] (10,0,2) -- (8,0,2) -- (8,2,2) -- (10,2,2) -- cycle;
        \node (A) at (8.68,0.68,1) {\Huge R};
    \end{tikzpicture}
\caption{Some caption}%
\label{label}%
\end{figure}
%
\end{document}

insira a descrição da imagem aqui

informação relacionada