I need to draw these figures, in the same way of the pic. Unfortunately I can't. I post my code.
code 1:
\documentclass[margin=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{angles,quotes}
\usetikzlibrary{arrows,arrows.meta}
\pagestyle{empty}
\newcommand{\degre}{\ensuremath{^\circ}}
% \renewcommand{\rmdefault}{phv}
\renewcommand{\sfdefault}{phv}
\usepackage{sansmath}
\definecolor{uququq}{rgb}{0.25098039215686274,0.25098039215686274,0.25098039215686274}
\tikzset{
quote/.style={{|[width=2mm]}-{|[width=2mm]}}
}
\begin{document}
\begin{tikzpicture}[> = stealth]
\coordinate (a) at (0,0);
\coordinate (b) at (3,3);
\coordinate (c) at (3,0);
\coordinate (d) at (0,3);
\coordinate (g) at (6,3);
\coordinate (h) at (3,6);
\coordinate (i) at (6,6);
\coordinate (e) at (5,5);
\coordinate (f) at (5,1);
\draw[black,step=1cm] (0,0) grid +(6cm,6cm);
\draw[line width=0.3mm, red, -] (b) -- node[above left] {\Huge \textbf{}} (a);
\draw[line width=0.3mm, red, -] (c) -- node[right] {\Huge \textbf{}} (d);
%\draw[ultra thick,blue,->] (a) -- node[below left] {\Large $\vec{d}$} (c);
\draw[line width=0.3mm, green, -] (g) -- node[right] {\Huge \textbf{}} (h);
\draw[line width=0.3mm, green, -] (b) -- node[right] {\Huge \textbf{}} (i);
\end{tikzpicture}
\end{document}
code 2:
\documentclass[margin=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{angles,quotes}
\usetikzlibrary{arrows,arrows.meta}
\pagestyle{empty}
\newcommand{\degre}{\ensuremath{^\circ}}
% \renewcommand{\rmdefault}{phv}
\renewcommand{\sfdefault}{phv}
\usepackage{sansmath}
\definecolor{uququq}{rgb}{0.25098039215686274,0.25098039215686274,0.25098039215686274}
\tikzset{
quote/.style={{|[width=2mm]}-{|[width=2mm]}}
}
\begin{document}
\begin{tikzpicture}[> = stealth]
\coordinate (a) at (5,1);
\coordinate (b) at (1,3);
\draw[black,step=1cm] (0,0) grid +(5cm,3cm);
\draw[line width=0.3mm, black, -] (b) -- node[above left] {\Huge \textbf{}} (a);
\end{tikzpicture}
\end{document}
code 3:
\documentclass[margin=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{angles,quotes}
\usetikzlibrary{arrows,arrows.meta}
\pagestyle{empty}
\newcommand{\degre}{\ensuremath{^\circ}}
% \renewcommand{\rmdefault}{phv}
\renewcommand{\sfdefault}{phv}
\usepackage{sansmath}
\definecolor{uququq}{rgb}{0.25098039215686274,0.25098039215686274,0.25098039215686274}
\tikzset{
quote/.style={{|[width=2mm]}-{|[width=2mm]}}
}
\begin{document}
\begin{tikzpicture}[> = stealth]
\draw[white,step=1cm] (0,0) grid +(6cm,8cm); %white grid
\draw [line width=0.8mm, color=black,fill=white,fill opacity=0.3] (3.0,1.0) circle (1.0cm);
\draw [line width=0.8mm,color=black,fill=blue,fill opacity=1.0] (1.0,3.0) circle (1.0cm);
\draw [line width=0.8mm, color=black,fill=white,fill opacity=0.3] (3.0,3.0) circle (1.0cm);
\draw [line width=0.8mm, color=black,fill=blue,fill opacity=1.0] (5.0,3.0) circle (1.0cm);
\draw [line width=0.8mm, color=black,fill=white,fill opacity=0.3] (1.0,5.0) circle (1.0cm);
\draw [line width=0.8mm, color=black,fill=green,fill opacity=1.0] (3.0,5.0) circle (1.0cm);
\draw [line width=0.8mm, color=black,fill=white,fill opacity=0.3] (5.0,5.0) circle (1.0cm);
\draw [line width=0.8mm, color=black,fill=white,fill opacity=0.3] (3.0,7.0) circle (1.0cm);
\end{tikzpicture}
\end{document}
code 4:
\documentclass[margin=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{angles,quotes}
\usetikzlibrary{arrows,arrows.meta}
\pagestyle{empty}
\newcommand{\degre}{\ensuremath{^\circ}}
% \renewcommand{\rmdefault}{phv}
\renewcommand{\sfdefault}{phv}
\usepackage{sansmath}
\definecolor{uququq}{rgb}{0.25098039215686274,0.25098039215686274,0.25098039215686274}
\tikzset{
quote/.style={{|[width=2mm]}-{|[width=2mm]}}
}
\begin{document}
\begin{tikzpicture}[> = stealth]
\coordinate (a) at (0,0);
\coordinate (b) at (2,0);
\coordinate (c) at (4,0);
\coordinate (d) at (6,0);
\coordinate (e) at (8,0);
\coordinate (f) at (1,2);
\coordinate (g) at (3,2);
\coordinate (h) at (5,2);
\coordinate (i) at (7,2);
\coordinate (l) at (2,4);
\coordinate (m) at (4,4);
\coordinate (n) at (6,4);
\coordinate (o) at (3,6);
\coordinate (p) at (5,6);
\coordinate (q) at (4,8);
\draw[white,step=1cm] (0,0) grid +(8cm,8cm);
\draw[line width=1.3mm, black, -] (e) -- node[above left] {\Huge \textbf{}} (a);
\draw[line width=1.3mm, black, -] (i) -- node[above left] {\Huge \textbf{}} (f);
\draw[line width=1.3mm, black, -] (n) -- node[above left] {\Huge \textbf{}} (l);
\draw[line width=1.3mm, black, -] (p) -- node[above left] {\Huge \textbf{}} (o);
\draw[line width=1.3mm, black, -] (f) -- node[above left] {\Huge \textbf{}} (b);
\draw[line width=1.3mm, black, -] (l) -- node[above left] {\Huge \textbf{}} (c);
\draw[line width=1.3mm, black, -] (o) -- node[above left] {\Huge \textbf{}} (d);
\draw[line width=1.3mm, black, -] (q) -- node[above left] {\Huge \textbf{}} (e);
\draw[line width=1.3mm, black, -] (i) -- node[above left] {\Huge \textbf{}} (d);
\draw[line width=1.3mm, black, -] (n) -- node[above left] {\Huge \textbf{}} (c);
\draw[line width=1.3mm, black, -] (p) -- node[above left] {\Huge \textbf{}} (b);
\draw[line width=1.3mm, black, -] (q) -- node[above left] {\Huge \textbf{}} (a);
\end{tikzpicture}
\end{document}
blue!20
instead ofblue
, or reduce thefill opacity
, as you for some reason have done for the white circles.