I have a simple cube in 3-space, 4 faces drawn in red and top and bottom in green.
\documentclass[border=5,tikz]{standalone}
\usepackage{tikz-3dplot}
\begin{document}
\foreach\s in{2,4,...,360}{
\tdplotsetmaincoords{2.71828+\s}{2.71828+\s*2}
\tikz[tdplot_main_coords,scale=.1]{
\path(-15cm,-15cm)(15cm,15cm);
\draw[ultra thick, color=black, fill=green!80!black]
(0,0,0)--(20,0,0)--(20,20,0)--(0,20,0)--cycle % bottom
(0,0,20)--(20,0,20)--(20,20,20)--(0,20,20)--cycle; % top
\draw[ultra thick, color=black, fill=red!80!black]
(0,0,0)--(20,0,0)--(20,0,20)--(0,0,20)--cycle
(0,20,0)--(20,20,0)--(20,20,20)--(0,20,20)--cycle
(0,0,0)--(0,20,0)--(0,20,20)--(0,0,20)--cycle
(20,0,0)--(20,20,0)--(20,20,20)--(20,0,20)--cycle;
}
}
\end{document}
that when seen from certain angles in TikZ, show an unexpected projection. It seems that when certain faces go on top of each other -- they become transparent!
Is this a bug, or there is something wrong with way the cube is built?


\foreach\s in{2,4,...,360}{% \tdplotsetmaincoords{2.71828+\s}{2.71828+\s*2} \tikz[tdplot_main_coords,scale=.1]{% \path(-15cm,-15cm)(15cm,15cm); \draw[ultra thick, color=black, fill=green!80!black] (0,0,0)--(20,0,0)--(20,20,0)--(0,20,0)--cycle; % bottom \draw[ultra thick, color=black, fill=green!80!black] (0,0,20)--(20,0,20)--(20,20,20)--(0,20,20)--cycle; % top \draw[ultra thick, color=black, fill=red!80!black] (0,0,0)--(20,0,0)--(20,0,20)--(0,0,20)--cycle;cont.... – cfr Feb 24 '16 at 01:05\draw[ultra thick, color=black, fill=red!80!black] (0,20,0)--(20,20,0)--(20,20,20)--(0,20,20)--cycle; \draw[ultra thick, color=black, fill=red!80!black] (0,0,0)--(0,20,0)--(0,20,20)--(0,0,20)--cycle; \draw[ultra thick, color=black, fill=red!80!black] (20,0,0)--(20,20,0)--(20,20,20)--(20,0,20)--cycle; }% };) – cfr Feb 24 '16 at 01:05tikz-3dplotrather than TikZ. This rotated coordinate system stuff is from that package rather thanpgfortikzproper. (It could be a bug in TikZ, but there's no reason to assume that is so, even if it is a bug rather than just a limitation.) There is no doubt that TikZ really isn't designed to do this andtikz-3dplotalready pushes the limits on what's doable, I think. Pushing them further... well, it isn't surprising it doesn't entirely work, I don't think. (Which isn't to say it is not a bug.) – cfr Feb 24 '16 at 01:12line join=roundas option to\tikzcommand. – Paul Gaborit Feb 24 '16 at 07:07nonzero ruleand which bits end up empty in overlapping shapes in a single path is dependent on the path direction. See the manual "Graphic Parameters: Interior Rules". – Mark Wibrow Feb 24 '16 at 08:04