How to do this path/lattice with tikz

by J.Rodriguez   Last Updated April 16, 2019 03:23 AM

I am looking for a way to do this lattice with tikz, and other similars to it.enter image description here

There are other similars to it, any idea?

Tags : tikz-pgf


Answers 1


It is not so hard with decorations.markings:

\documentclass[tikz]{standalone}
\usetikzlibrary{decorations.markings}
\begin{document}
\begin{tikzpicture}
\draw (0,0) grid (5,5);
\foreach \i in {0,...,5}
    \foreach \j in {0,...,5}
        \fill (\i,\j) circle (1pt);
\draw[ultra thick,red,postaction=decorate,decoration={
    markings,
    mark=between positions {0.5/11} and {10.5/11} step {1/11} with {
        \draw[-stealth,very thin] (-.4,.1)--(.4,.1);}
}] (0,2) -- (2,2) |- (1,1) |- (4,5);
\fill[red] (0,2) circle (2pt) node[left] {Identity} 
           (4,5) circle (2pt) node[above] {End of path};
\end{tikzpicture}
\end{document}

enter image description here

JouleV
JouleV
April 16, 2019 02:44 AM

Related Questions


Updated April 27, 2019 15:23 PM

Updated December 20, 2018 03:23 AM

Updated November 20, 2018 12:23 PM

Updated December 17, 2018 22:23 PM

Updated December 18, 2018 02:23 AM