von Patrick1990 » Fr 15. Sep 2017, 16:53
Hallo,
ich versuche gerade ein wenig kompliziertere Gleichungen darzustellen.
Leider erhalte ich für den Punkt M ein falsches Ergebnis.
Richtig wäre M( 40.46,163.88 ).
Was mache ich falsch?
Hier das Minimalbeispiel:
\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.15}
\begin{document}
\begin{tikzpicture}[
scale=1,
>=latex
]
\begin{axis}
[
trig format plots=rad,
xmin=0,
xmax=2,
ymin=150,
ymax=200,
]
%
\def\pol{4}
\def\kpol{0.8}
\def\alphap{0.9}
\def\delt{1}
\def\dsi{360}
%
\def\fxm{sin(pi/(2*\pol)*\alphap)*((\dsi-2*\delt)/2-(\kpol*\delt*(1/(cos(\pol*(pi/(2*\pol)*\alphap)))-1)))}
\def\fym{cos(1/(2*\pol)*pi*\alphap)*((\dsi-2*\delt)/2-(\kpol*\delt*(1/(cos(\pol*(1/(2*\pol)*pi*\alphap)))-1)))}
\pgfmathsetmacro\resultX{\fxm}
\pgfmathsetmacro\resultY{\fym}
%
%
\coordinate (M) at (\resultX,\resultY);
\draw (0,0) -- (M);
\end{axis}
\end{tikzpicture}
\end{document}
Hallo,
ich versuche gerade ein wenig kompliziertere Gleichungen darzustellen.
Leider erhalte ich für den Punkt M ein falsches Ergebnis.
Richtig wäre M( 40.46,163.88 ).
Was mache ich falsch?
Hier das Minimalbeispiel:
[code]\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.15}
\begin{document}
\begin{tikzpicture}[
scale=1,
>=latex
]
\begin{axis}
[
trig format plots=rad,
xmin=0,
xmax=2,
ymin=150,
ymax=200,
]
%
\def\pol{4}
\def\kpol{0.8}
\def\alphap{0.9}
\def\delt{1}
\def\dsi{360}
%
\def\fxm{sin(pi/(2*\pol)*\alphap)*((\dsi-2*\delt)/2-(\kpol*\delt*(1/(cos(\pol*(pi/(2*\pol)*\alphap)))-1)))}
\def\fym{cos(1/(2*\pol)*pi*\alphap)*((\dsi-2*\delt)/2-(\kpol*\delt*(1/(cos(\pol*(1/(2*\pol)*pi*\alphap)))-1)))}
\pgfmathsetmacro\resultX{\fxm}
\pgfmathsetmacro\resultY{\fym}
%
%
\coordinate (M) at (\resultX,\resultY);
\draw (0,0) -- (M);
\end{axis}
\end{tikzpicture}
\end{document}[/code]