Files
Hochschulmathematik/TestControls.tex
2026-01-18 16:08:19 +01:00

58 lines
1.5 KiB
TeX

%!tikz editor 1.0
\documentclass{article}
\usepackage{tikz}
\usepackage[graphics, active, tightpage]{preview}
\usepackage{circuitikz}
\PreviewEnvironment{tikzpicture}
%!tikz preamble begin
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
%!tikz preamble end
\begin{document}
%!tikz source begin
\begin{tikzpicture}[scale=3]
\begin{axis}[ axis lines=middle,
xmin=-8, xmax=6,
ymin=-8, ymax=4,
grid=both,
axis equal image]
% ---- obere Schleife ----
\addplot[thick, blue]
plot coordinates {(0,0)}
.. controls (5,1) and (5,4) ..
(0,4) .. controls (-6,4) and (-6.5,2) .. (-6.5,2)
.. controls (-7,-2) and (-7,-2) .. (-5.5,-4);
% .. controls (-2,4) and (-2,2) ..
% (0,0);
% ---- untere Schleife ----
%\addplot[thick, blue]
% plot coordinates {(0,0)}
% .. controls (2,-2) and (2,-4) ..
% (0,-4)
% .. controls (-2,-4) and (-2,-2) ..
% (0,0);
% ---- Punkte markieren ----
% Hauptpunkte
\addplot[only marks, mark=*] coordinates {(0,0) (0,4) (0,-4)};
% Kontrollpunkte
\addplot[only marks, mark=x, mark options={red}]
coordinates {(2,2) (2,4) (-2,4) (-2,2) (2,-2) (2,-4) (-2,-4) (-2,-2)};
\end{axis}
% \draw[help lines] (-3,-2) grid (8,3);
% \draw[thick] (-2,0) .. controls (-2.5,2) and (-1.5,3) .. (0,2.5)
% .. controls (2,2) and (1.5,0.7) .. (-0.5,1)
%.. controls (-0.3,0.5) and (-0.6,-0.5) ..(-0.6,-1)
%.. controls (-1.5,-1.5) and (-2,-1) .. (-2,0);
%\draw[thick] (2,2.5) .. controls (3.5,1.5) and (2.5,-1.5) .. (1,-1)
%.. controls (-0.5,-0.2) and (1,1.8) .. (2,2.5);
\end{tikzpicture}
%!tikz source end
\end{document}