TransWikia.com

how to write code of this diagram like photo below :

TeX - LaTeX Asked by Fatlum on November 29, 2020

enter image description here

I’m a beginner on this, can anyone help me ?

One Answer

For a starting point and only left picture.

documentclass[tikz,margin=3mm]{standalone}

tikzset{
 reddot/.style={draw, fill,circle, minimum size=2pt,inner sep=0pt,color=red},
 graydot/.style={draw, fill,circle, minimum size=2pt,inner sep=0pt,color=gray},
 blackdot/.style={draw, fill,circle, minimum size=2pt,inner sep=0pt,color=black},
}

begin{document}

  begin{tikzpicture}[>=latex]
  foreach x in {0,1,2}{
node at (x,0) [reddot] (x) {};}
node at (0.5,0.5) [blackdot] (3) {};
node at (1.5,0.5) [graydot] (4) {};
node at (0.5,-0.5) [graydot] (5) {};
node at (1.5,-0.5) [blackdot] (6) {};
node at (1,1) [reddot] (7) {};
node at (1,-1) [reddot] (8) {};
draw (0,1)--(3)--(4)--(2,1);
draw (0,-1)--(5)--(6)--(2,-1);
draw (3)--(5) (4)--(6);
draw [red,->](7)--(1);
draw [red,->](8)--(1);
draw [red,->](1)--(0);
draw [red,->](1)--(2);
draw[red,,->] (2) arc[radius=1, start angle=0, end angle= 90];
draw[red,,->] (0) arc[radius=1, start angle=180, end angle= 270];
  end{tikzpicture}
end{document}

enter image description here

Correct answer by ferahfeza on November 29, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP