3

I tried to draw hidden lines as shown in this picture but i could not figure out how to do it. Please help me to fix this problem, I try this code

enter image description here

\begin{document}
\begin{tikzpicture}[z={(3.85mm, -3.85mm)}]
\pgfmathsetmacro{\cubex}{1.5}
\pgfmathsetmacro{\cubey}{1.5}
\pgfmathsetmacro{\cubez}{1.5}
\foreach \x/\j in {0/blue,2.3/blue,4.3/blue} 
\draw[\j] (\x,0,0) -- ++(0,\cubey,0) -- ++(0,0,\cubez) -- ++(0,-\cubey,0) -- cycle;
\end{tikzpicture}
2

enter image description here

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[z={(3.85mm, -3.85mm)}]
\pgfmathsetmacro{\cubex}{1.5}
\pgfmathsetmacro{\cubey}{1.5}
\pgfmathsetmacro{\cubez}{1.5}
\foreach \x/\j in {0/blue,2.3/blue,4.3/blue} {
\draw[\j] (\x,0,0) -- ++(0,0,\cubez) -- ++(0,-\cubey,0) ;
\draw[dashed,\j] (\x,0,0) -- ++(0,-\cubey,0) -- ++(0,0,\cubez);
}
\end{tikzpicture}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.