Tengo una imagen en mi tesis donde analizo las similitudes de los conceptos básicos de color y una brújula. La imagen original es algo que junté mal en Paint, pero pensé que podría mejorarla un poco juntando algo mal con tikz
. Esta es la imagen original:
Mi plan es tener al final algo vagamente parecido a esto, pero en este momento estoy estancado porque el área que estoy tratando de llenar con negro no se llena y no puedo entender qué estoy haciendo mal. Así luce en este momento:
Quería que el área entre las dos líneas del norte fuera de color negro. Y este es mi código:
\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}
Me doy cuenta de que mi código es muy repetitivo, pero intenté definir los aspectos de tikzpicture
y crear un /.style
pero no tuve éxito, así que decidí hacerlo de esta manera para que funcione y limpiarlo más tarde cuando tenga todos los detalles resueltos.
Respuesta1
deberías usar coordenadas en lugar de nodos:
\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}