MA0301/exercise10/diagrams/ex3.tex

36 lines
842 B
TeX
Raw Normal View History

2021-05-03 01:06:04 +02:00
\newcommand{\point}[3]{
\node [label=#3:$#1$] (#1) at #2 {};
}
\begin{tikzpicture}[]
\begin{scope}[every node/.style={fill=black, shape=circle, inner sep=1pt}]
% a
\point{d}{(0,1)}{left}
\point{h}{(0,0)}{below}
\point{e}{(1,1)}{right}
% i
\point{b}{(3,2)}{above}
\point{f}{(3,1)}{left}
\point{j}{(3,0)}{below}
\point{c}{(4,2)}{above}
% g
\point{k}{(4,0)}{below}
\end{scope}
\begin{scope}[every node/.style={fill=red, shape=circle, inner sep=2pt}]
\point{a}{(0,2)}{above}
\point{i}{(1,0)}{below}
\point{g}{(4,1)}{right}
\end{scope}
\draw (a) -- (d) -- (h);
\draw (e) -- (i);
\draw (b) -- (f) -- (j);
\draw (c) -- (g) -- (k);
\draw (a) -- (b) -- (c);
\draw (a) -- (e);
\draw (d) -- (e);
\draw (f) -- (g);
\draw (h) -- (i) -- (j) -- (k);
\end{tikzpicture}