0

This is what I want to draw: enter image description here

Until now I have, with help of Diagramming Unit Circle and Sine Wave with TikZ the following code:

\documentclass[a4paper]{article}% guessing (cfr)
\usepackage[landscape,scale=.9]{geometry}
\usepackage{tikz}
\usetikzlibrary{datavisualization.formats.functions,backgrounds,calc}
\usetikzlibrary{quotes,angles}
\def\mytypesetter#1{% page 813
  \pgfmathparse{#1/pi}%
  \pgfmathprintnumber{\pgfmathresult}$\pi$%
}
\begin{document}% added - surely necessary! (cfr)
  \centering
  \begin{tikzpicture}[scale=4,cap=round,>=latex,baseline={(0,0)}]
    \draw[->] (-1.5cm,0cm) -- (1.5cm,0cm) node[right,fill=white] {$t$ / tE};
    \draw[->] (0cm,-1.5cm) -- (0cm,1.5cm) node[above,fill=white] {$s$ / sE};
\draw[thick] (0cm,0cm) circle(1cm);

\draw (0,0) coordinate (a) -- (0.5,0) coordinate (b) -- (0.5,.86) coordinate (c) node[midway, right] {$s(t)$} --(0.0,0) coordinate (d) --(0.0,1) coordinate (e) node[midway, right] {$r$} pic["$\varphi$", draw=orange, <->, angle eccentricity=1.2, angle radius=1cm] {angle=b--a--c} ; \draw[thick,red,dashed](0 cm, 1 cm)--(3.5 cm, 1 cm) ; \draw[thick,red,dashed](0 cm, -1 cm)--(3.5 cm, -1 cm) ; \draw[thick,blue,dotted](0 cm, .86 cm)--(2.52 cm, .86 cm) ; \begin{scope}[xshift=20mm] \datavisualization [ school book axes, y axis={unit length=10mm}, x axis={unit length=2.5mm, ticks={step=(.5pi), tick typesetter/.code=\mytypesetter{##1}}}, visualize as smooth line, ] data [format=function] { var x : interval [0:2pi]; func y = sin(\value x r); }; \end{scope}

\end{tikzpicture} \end{document}

The result is:

enter image description here

But I didn't know, how to add the second/third axis.

Bernard
  • 271,350

1 Answers1

1

enter image description here

\documentclass[tikz, margin=3mm]{standalone}
\usetikzlibrary{angles, arrows.meta,
                backgrounds,
                calc,
                quotes}

\begin{document} \begin{tikzpicture}[scale=4] % polar \draw[->] (-1.5cm,0cm) -- (1.5cm,0cm) node[right] {$t$ / tE}; \draw[->] (0cm,-1.5cm) -- (0cm,1.5cm) node[above] {$s$ / sE}; % \draw (0cm,0cm) circle(1cm); % vector, angle \draw[thick]
(0,0) coordinate (a) to (0.5,0) coordinate (b) to ["$s(t)$"] (0.5,.86) coordinate (c) to ["$r$" '] (a) (0, 1) coordinate (d) (0,-1) coordinate (e) pic["$\varphi$", draw=orange, <->, angle eccentricity=1.2, angle radius=1cm] {angle=b--a--c}; % time axes \draw[->] (2,0) -- (6,0) node[right] {$t$}; \draw[->] (2.5,-1.5) -- (2.5,1.5) node[above] {$s$}; \foreach \i/\j in {0.25pi/{T/2}, 0.75pi/{T}} \draw (\i+2.5,1pt) -- ++ (0,-2pt) node[below] {$\j$}; % time function \draw[thick] plot [domain=0:2*pi,samples=101] (0.5\x+2.5,{sin(\x r)}); % phase axe \draw[->] (2.5,-0.6) -- ++ (3.5,0) node[right] {$\varphi$}; \foreach \i/\j [count=\x] in {90/{\pi/2},180/{3\pi/4}, 270/{3\pi/4},360/{2\pi} } \draw (0.25pi*\x+2.5,-0.6cm+1pt) node[above] {\i} -- ++ (0,-2pt) node[below] {$\j$}; % unit borders \draw[red,dashed] (d) -- (d -| 6,0) (e) -- (0,-1 -| 6,0); \draw[blue,dotted] (0,.86) -- (3.5,0.86); \end{tikzpicture} \end{document}

Zarko
  • 296,517