SSブログ

Tikz/PGF 覚書(8) [TikZ/PGF]

texshop_image 2.png
\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] (-1,0)--(-0.3,-0.3)--(0,-1)--(0.3,-0.3)--(1,0)--(0.7,0.7)--(0,1)--(-0.7,0.7)--cycle; \fill [fill=white,xscale=#1] (0.2,0.7) circle (3pt); \fill [fill=white,xscale=#1] (-0.2,0.7) circle (3pt); \draw [pencildraw,xscale=#1] (0.2,0.7) circle (3pt); \draw [pencildraw,xscale=#1] (-0.2,0.7) circle (3pt); \end{scope} } % Repeat Tiling \foreach \x in {-3,...,3}{\foreach \y in {-1,...,2}{ \pgfmathsetmacro{\yd}{2*\y+mod(abs(\x),2)}; \begin{scope}[shift={(\x,\yd)}] \pgfmathsetmacro{\fc}{1-2*mod(abs(\x+\y),2)}; \drawBox[\fc](orange) \end{scope}}} \end{tikzpicture}

nice!(1)  コメント(0)  トラックバック(0) 
共通テーマ:学問

nice! 1

コメント 0

コメントを書く

お名前:[必須]
URL:
コメント:
画像認証:
下の画像に表示されている文字を入力してください。

Facebook コメント

トラックバック 0

この広告は前回の更新から一定期間経過したブログに表示されています。更新すると自動で解除されます。