私の論文には、基本的な色の概念とコンパスの類似点について論じている画像があります。元の画像はペイントで雑にまとめたものですが、 を使って雑にまとめることで、もう少し良くできると思いましたtikz
。これが元の画像です。
私の計画は、最終的にこれに似たものを作ることですが、現時点では、黒で塗りつぶそうとしている領域が塗りつぶされず、何が間違っているのかわからないため、行き詰まっています。現時点では、次のようになっています。
2 本の北の線の間の領域を黒くしたいと考えました。これが私のコードです:
\documentclass{book}
\usepackage{tikz}
\usetikzlibrary {decorations.pathmorphing}
\begin{document}
\begin{tikzpicture}[inner sep=0,outer sep=0,]
% circles (from centre)
\node[thick,draw=black,circle,
minimum size=1cm,
decorate,
decoration={random steps,segment length=1.5pt,amplitude=0.2pt}] (centre) at (0,0) {};
\node[thick,draw=black,circle,
minimum size=4.5cm,
decorate,
decoration={random steps,segment length=1.5pt,amplitude=0.2pt}] (inedge) at (0,0) {};
\node[thick,draw=black,circle,
minimum size=5cm,
decorate,
decoration={random steps,segment length=1.5pt,amplitude=0.2pt}] (outedge) at (0,0) {};
% main direction nodes
\begin{scope}[label distance=0.5cm]
% North
\node[thick,draw=black,circle,
minimum size=0.3cm,
label=above:\Large{$\mathcal{N}$}] (N) at (0,3.5) {};
\node[circle,draw=black,fill=black,
minimum size=1.5mm] (n) at (0,3.5) {};
% East
\node[thick,draw=black,circle,
minimum size=0.3cm,
label=right:\Large{$\mathcal{E}$}] (E) at (3.5,0) {};
\node[circle,draw=black,fill=black,
minimum size=1.5mm] (e) at (3.5,0) {};
% South
\node[thick,draw=black,circle,
minimum size=0.3cm,
label=below:\Large{$\mathcal{S}$}] (S) at (0,-3.5) {};
\node[circle,draw=black,fill=black,
minimum size=1.5mm] (s) at (0,-3.5) {};
% West
\node[thick,draw=black,circle,
minimum size=0.3cm,
label=left:\Large{$\mathcal{W}$}] (W) at (-3.5,0) {};
\node[circle,draw=black,fill=black,
minimum size=1.5mm] (w) at (-3.5,0) {};
\end{scope}
% mainlines
\draw[thick,
decorate,
decoration={random steps,segment length=3pt,amplitude=0.1pt}]
(centre) -- (N);
\draw[thick,
decorate,
decoration={random steps,segment length=3pt,amplitude=0.1pt}]
(centre) -- (E);
\draw[thick,
decorate,
decoration={random steps,segment length=3pt,amplitude=0.1pt}]
(centre) -- (S);
\draw[thick,
decorate,
decoration={random steps,segment length=3pt,amplitude=0.1pt}]
(centre) -- (W);
% Main points
\filldraw[black] (-0.35cm,0.35cm) -- (N) -- (centre) -- cycle; % why u no fill?!!
\end{tikzpicture}
\end{document}
私のコードは非常に反復的であることは承知していますが、 の側面を定義してtikzpicture
を作成しよう/.style
としましたが成功しませんでした。そのため、これが機能するようにこの方法で実行し、詳細をすべて把握した後でクリーンアップすることにしました。
答え1
ノードの代わりに座標を使用する必要があります。
\documentclass{book}
\usepackage{tikz}
\usetikzlibrary {decorations.pathmorphing}
\begin{document}
\begin{tikzpicture}[inner sep=0,outer sep=0,]
% circles (from centre)
\node[thick,draw=black,circle,
minimum size=1cm,
decorate,
decoration={random steps,segment length=1.5pt,amplitude=0.2pt}] (centre) at (0,0) {};
\node[thick,draw=black,circle,
minimum size=4.5cm,
decorate,
decoration={random steps,segment length=1.5pt,amplitude=0.2pt}] (inedge) at (0,0) {};
\node[thick,draw=black,circle,
minimum size=5cm,
decorate,
decoration={random steps,segment length=1.5pt,amplitude=0.2pt}] (outedge) at (0,0) {};
% main direction nodes
\begin{scope}[label distance=0.5cm]
% North
\node[thick,draw=black,circle,
minimum size=0.3cm,
label=above:\Large{$\mathcal{N}$}] (N) at (0,3.5) {};
\node[circle,draw=black,fill=black,
minimum size=1.5mm] (n) at (0,3.5) {};
% East
\node[thick,draw=black,circle,
minimum size=0.3cm,
label=right:\Large{$\mathcal{E}$}] (E) at (3.5,0) {};
\node[circle,draw=black,fill=black,
minimum size=1.5mm] (e) at (3.5,0) {};
% South
\node[thick,draw=black,circle,
minimum size=0.3cm,
label=below:\Large{$\mathcal{S}$}] (S) at (0,-3.5) {};
\node[circle,draw=black,fill=black,
minimum size=1.5mm] (s) at (0,-3.5) {};
% West
\node[thick,draw=black,circle,
minimum size=0.3cm,
label=left:\Large{$\mathcal{W}$}] (W) at (-3.5,0) {};
\node[circle,draw=black,fill=black,
minimum size=1.5mm] (w) at (-3.5,0) {};
\end{scope}
% mainlines
\draw[thick,
decorate,
decoration={random steps,segment length=3pt,amplitude=0.1pt}]
(centre) -- (N);
\draw[thick,
decorate,
decoration={random steps,segment length=3pt,amplitude=0.1pt}]
(centre) -- (E);
\draw[thick,
decorate,
decoration={random steps,segment length=3pt,amplitude=0.1pt}]
(centre) -- (S);
\draw[thick,
decorate,
decoration={random steps,segment length=3pt,amplitude=0.1pt}]
(centre) -- (W);
% Main points
\filldraw[draw=red,fill=blue] (-0.35cm,0.35cm) -- (N.north) -- (centre.center) -- cycle; % why u no fill?!!
\end{tikzpicture}
\end{document}