Code

Code

Ich versuche, einen Winkel zwischen zwei Linien zu zeichnen.

Ich habe diesen Code bisher, aber ich kann keinen Winkel zeichnen. Wie mache ich das? Ich verwende PGF/TikZ.

\begin{figure}
   \begin{tikzpicture}
      \begin{axis}[
         ticks=none,
         axis lines = middle,
         axis line style={->},
         ymin=-1.5, ymax=1.5,
         xmin=-1.5, xmax=1.5,
         axis equal]
         \addplot[black, domain=0:0.7071] {x};
         \draw[black] (axis cs:0,0) circle [radius=1];
      \end{axis}
   \end{tikzpicture}
\end{figure}

Danke.

Antwort1

Die arcOperation kann hier verwendet werden. Die allgemeine Syntax, wie sie im TikZ/PGF-Handbuch empfohlen wird (danke an@Tobifür den Kommentar) ist

\draw (<starting point>) arc [<options>];

mit diesen Optionen:

  • radius=<dim>
  • x radius=<dim>
  • y radius=<dim>
  • start angle=<deg>
  • end angle=<deg>
  • delta angle=<deg>

oder eine weniger lesbare Version

\draw (<starting point>) arc (<start angle>:<end angle>:<radius>);

wobei <radius>es sich um eine einzelne Länge oder <dim> and <dim>um unterschiedliche Radien handeln kann.

Code

\documentclass[border=2pt]{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
  \begin{axis}[
      ticks=none,
      axis lines = middle,
      axis line style={->},
      ymin=-1.5, ymax=1.5,
      xmin=-1.5, xmax=1.5,
    axis equal]
    \addplot[black, domain=0:0.7071] {x};
    \draw[black] (axis cs:0,0) circle [radius=1];
    \draw (axis cs:.125,0)arc[radius=.25cm,start angle=0,end angle=45];
    % \draw (axis cs:.125,0)arc(0:45:.25cm); % same as above with different syntax
  \end{axis}
\end{tikzpicture}  
\end{document}

Ausgabe

Bildbeschreibung hier eingeben

Antwort2

Mit PSTricks. Gefällt Ihnen das?

\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pst-eucl}
\begin{document}
\begin{pspicture}[showgrid](-2,-2)(4,4)
    \pstGeonode
        (1,1){B}
        ([nodesep=2,angle=60]B){A}
        ([nodesep=2,angle=20]B){C}
    \pscircle(B){2}
    \psline(A)(B)(C)
    \psarc[origin={B}](B){1}{(C)}{(A)}
\end{pspicture}
\end{document}

Bildbeschreibung hier eingeben

Version 2

\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pst-node}
\begin{document}
\begin{pspicture}[showgrid](-2,-2)(2,2)
    \psline(-2,0)(2,0)
    \psline(0,-2)(0,2)
    \pnodes(0,0){B}(1;60){A}(1;20){C}
    \psline(A)(B)(C)
    \psarc[origin={B}](B){.2}{(C)}{(A)}
\end{pspicture}
\end{document}

Bildbeschreibung hier eingeben

verwandte Informationen