-1

I want to draw the following paths. But I don't know how to start because I am new to this and I am learning. Can someone help me?enter image description here

Torbjørn T.
  • 206,688
  • 5
    Hi I think it is good example to start https://tex.stackexchange.com/questions/279221/trying-to-draw-a-picture-of-an-automata-in-texmaker-using-tikz – WinnieNotThePooh Oct 18 '21 at 20:16

2 Answers2

5

With use of the tikz package:

\documentclass[border=3.141592]{standalone}
\usepackage{tikz}
\usetikzlibrary{chains,
                positioning}

\begin{document} \begin{tikzpicture}[ node distance = 12mm, start chain = v going right, V/.style = {circle,draw, fill=blue, inner sep=1pt, node contents={}, on chain}, every label/.append style = {font=\footnotesize\sffamily, text=blue} ] \foreach \x in {A, B, C, D} \node[V, label=\x]; % \draw (v-1) to (v-2) (v-1) to [bend left] (v-2) (v-1) to [bend left=45] (v-3) (v-1) to [bend right] (v-2) (v-1) to [bend right=45] (v-2) (v-1) to [bend right=45] (v-3) (v-2) to [bend left] (v-3) (v-2) to [bend right] (v-3) (v-3) to [bend left] (v-4) (v-3) to (v-4) (v-3) to [bend right] (v-4); \end{tikzpicture} \end{document}

enter image description here

Zarko
  • 296,517
2

Here is a way to do it with pstricks:

\documentclass[border=6pt, svgnames]{standalone}
\usepackage{pst-eucl}

\begin{document}

\begin{pspicture}(-1,-1.5)(10,1.5) \sffamily\color{Blue} \psset{PtNameMath=false} \pstGeonodePosAngle={120,90,90,60}{A}(3,0){B}(6,0){C}(9,0){D} \psline(A)(B) \psline(C)(D) \pcarcarcangle=40(B)\pcarcarcangle=60(C) \pcarcarcangle=40(D) \pcarcarcangle=-30(B)\pcarcarcangle=-30(C) \pcarcarcangle=-30(D) \pcarcarcangle=60(C)\pcarcarcangle=-60(C) \pcarcarcangle=-60(B) \end{pspicture}

\end{document}

enter image description here

Bernard
  • 271,350
  • I have problems when I compiled it. – Alejandra Benítez Oct 18 '21 at 22:26
  • @AlejandraBenítez What are the problems? If you use a basic distribuition of MikTeX (for example) peraphs the package pst-eucl it is not into. – Sebastiano Oct 18 '21 at 22:36
  • @Sebastiano I used TexStudio and already installed the package but I always have errors – Alejandra Benítez Oct 18 '21 at 22:39
  • 1
    @AlejandraBenítez: If you compile with pdflatex, it doesn't work because pdflatex doesn't have the tools to make the computations required by Adobe Postscript code. So either, you follow the traditional chain: latex > dvips > pstopdf, or, simpler, you compile with xelatex --shell-escape. – Bernard Oct 19 '21 at 08:59