我怎样才能使最低的钻石形状看起来与其他的一样?
可以添加条纹图案吗?
\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\pagestyle{empty}
\begin{tikzpicture}[scale=.9,every node/.style={minimum size=1cm},on grid]
\begin{scope}[
yshift=-83,every node/.append style={
yslant=0.5,xslant=-1},yslant=0.5,xslant=-1
]
\fill[white,fill opacity=0.9] (0,0) rectangle (5,5);
\draw[black,very thick] (0,0) rectangle (5,5);
\end{scope}
\begin{scope}[
yshift=0,every node/.append style={
yslant=0.5,xslant=-1},yslant=0.5,xslant=-1
]
\fill[black,fill opacity=.9] (0,0) rectangle (5,5);
\draw[black,very thick] (0,0) rectangle (5,5);
\end{scope}
\begin{scope}[
yshift=90,every node/.append style={
yslant=0.5,xslant=-1},yslant=0.5,xslant=-1
]
\fill[gray] (0,0) rectangle (5,5);
\draw[black,very thick] (0,0) rectangle (5,5);
\end{scope}
\begin{scope}[
yshift=170,every node/.append style={
yslant=0.5,xslant=-1},yslant=0.5,xslant=-1
]
\fill[white,fill opacity=0.6] (0,0) rectangle (5,5);
\draw[black,very thick] (0,0) rectangle (5,5);
\end{scope}
\begin{scope}[
yshift=-170,every node/.append style={
yslant=0.5,xslant=-1},yslant=0.5,xslant=-1
]
\fill[gray] (0,0) rectangle (5,5);
\draw[black,very thick] (0,0) rectangle (5,5);
\end{scope}
\end{tikzpicture}
\end{document}
答案1
先画出这个菱形。
\begin{tikzpicture}[scale=.9,every node/.style={minimum size=1cm},on grid]
\begin{scope}[
yshift=-170,every node/.append style={
yslant=0.5,xslant=-1},yslant=0.5,xslant=-1
]
\fill[gray] (0,0) rectangle (5,5);
\draw[black,very thick] (0,0) rectangle (5,5);
\end{scope}
\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\pagestyle{empty}
\begin{tikzpicture}[scale=.9,every node/.style={minimum size=1cm},on grid]
\begin{scope}[
yshift=-170,every node/.append style={
yslant=0.5,xslant=-1},yslant=0.5,xslant=-1
]
\fill[gray] (0,0) rectangle (5,5);
\draw[black,very thick] (0,0) rectangle (5,5);
\end{scope}
\begin{scope}[
yshift=-83,every node/.append style={
yslant=0.5,xslant=-1},yslant=0.5,xslant=-1
]
\fill[white,fill opacity=0.9] (0,0) rectangle (5,5);
\draw[black,very thick] (0,0) rectangle (5,5);
\end{scope}
\begin{scope}[
yshift=0,every node/.append style={
yslant=0.5,xslant=-1},yslant=0.5,xslant=-1
]
\fill[black,fill opacity=.9] (0,0) rectangle (5,5);
\draw[black,very thick] (0,0) rectangle (5,5);
\end{scope}
\begin{scope}[
yshift=90,every node/.append style={
yslant=0.5,xslant=-1},yslant=0.5,xslant=-1
]
\fill[gray] (0,0) rectangle (5,5);
\draw[black,very thick] (0,0) rectangle (5,5);
\end{scope}
\begin{scope}[
yshift=170,every node/.append style={
yslant=0.5,xslant=-1},yslant=0.5,xslant=-1
]
\fill[white,fill opacity=0.6] (0,0) rectangle (5,5);
\draw[black,very thick] (0,0) rectangle (5,5);
\end{scope}
\end{tikzpicture}
\end{document}