Tikz/PGF 覚書(9) [TikZ/PGF]
一週間のご無沙汰で、自身がすっかりもう忘れてる。
それでも懲りずに習作を。
コードは
コードは
\begin{tikzpicture}[scale=2,pencildraw/.style={decorate,decoration={random steps,segment length=4pt,amplitude=0.6pt}}] % Unit Tile Drawing \def\drawBox[#1](#2){ \begin{scope}[line width=2 pt]%,nearly transparent,cap=round] % \draw [pencildraw,fill=#2,xscale=#1] (-0.5,-0.5)--(-0.2,-0.3)--(0.5,-0.5)--(0.4,0.1)--(0.5,0.5)--(-0.2,0.7)--(-0.5,0.5)--(-0.6,0.1)--cycle; \draw [pencildraw,fill=#2,yscale=#1] (0,0.6)--(-0.4,0.5)--(-0.6,0)--(-0.4,-0.5)--(0,-0.4)--(0.4,-0.5)--(0.6,0)--(0.4,0.5)--cycle; \fill [fill=white,yscale=#1] (0.2,0.3) circle (3pt); \fill [fill=white,yscale=#1] (-0.2,0.3) circle (3pt); \draw [pencildraw,yscale=#1] (0.2,0.3) circle (3pt); \draw [pencildraw,yscale=#1] (-0.2,0.3) circle (3pt); % \fill [pencildraw,fill=black] (-0.25,0.3) circle (1pt); \end{scope} } % Repeat Tiling \foreach \x in {-3,...,3}{\foreach \y in {-2,...,2}{ \pgfmathsetmacro{\yd}{\y+mod(abs(\x),2)/2}; \begin{scope}[shift={(\x,\yd)}] \pgfmathsetmacro{\fc}{1-2*mod(abs(\x),2)}; \drawBox[\fc](orange) \end{scope}}} \end{tikzpicture}
コメント 0