I've been using tikz
and tkz-euclide
to draw a 2D diagram of a section of a triangular mesh.
I have drawn the nodes, edges and angles as in the MWE below. The problem is the fill of one of the angles does not cover the whole area between the two edges. Notice the white space visible between the red fill and the edge between nodes v0
and v5
.
I've tried many suggestions posted on this site on how to mark angles using tikz
and/or tkz-euclide
. This code is nearly exactly what I want - if the fill was correct.
\documentclass[]{article}
\usepackage{tikz, tkz-euclide}
\usetikzlibrary{calc,intersections}
\usetkzobj{all}
\tikzstyle{vertex}=[circle, color=black, fill=black, draw, inner sep=0pt, minimum size=6pt]
\tikzstyle{redVertex}=[circle, color=red!100, fill=red!50, draw, inner sep=0pt, minimum size=6pt]
\begin{document}
\begin{tikzpicture}[x=3cm, y=3cm]
\node (v0) at (1,1) [redVertex, label={[yshift=+0.3cm]right:$x_i$}] {};
\node (v1) at (0,1) [vertex, label=left:$x_{k1}$] {};
\node (v2) at (0,2) [vertex] {};
\node (v3) at (1,2) [vertex] {};
\node (v4) at (2,1) [vertex] {};
\node (v5) at (2,0) [vertex, label=below:$x_{k2}$] {};
\node (v6) at (1,0) [redVertex, label=below:$x_j$] {};
\path[thick]
(v1) edge [dashed] (v2)
(v1) edge (v0)
(v1) edge (v6)
(v2) edge [dashed] (v3)
(v2) edge [dashed] (v0)
(v3) edge [dashed] (v0)
(v3) edge [dashed] (v4)
(v0) edge [dashed] (v4)
(v0) edge (v6)
(v0) edge (v5)
(v4) edge [dashed] (v5)
(v6) edge (v5)
;
\tkzMarkAngle[size=.3](v6,v1,v0)
\tkzLabelAngle[pos=.15](v6,v1,v0){$\alpha_{ij}$}
\tkzMarkAngle[size=.3](v0,v5,v6)
\tkzLabelAngle[pos=.15](v0,v5,v6){$\beta_{ij}$}
\tkzMarkAngle[size=.25](v1,v0,v6)
\tkzLabelAngle[pos=-.20](v1,v0,v6){$\theta_{1}$}
\tkzFillAngle[fill=red!50, size=.30](v6,v0,v5)
\tkzLabelAngle[pos=.19](v6,v0,v5){$\theta_{2}$}
\end{tikzpicture}
\end{document}
Which produces: