3D-kartesischer Raum mit tikz-3D und Platzierung von Messbögen zur Anzeige des Höhenwinkels

3D-kartesischer Raum mit tikz-3D und Platzierung von Messbögen zur Anzeige des Höhenwinkels

Ich habe derzeit den folgenden Code

\tdplotsetmaincoords{60}{45}
\begin{tikzpicture}[tdplot_main_coords]

    \coordinate (0) at (0,0,0);
    \tdplotsetcoord{P}{3}{45}{45} 


    \draw[thick, ->] (0,0,0) -- (3,0,0) node[anchor=north east]{$x$ (front)};
    \draw[thick, ->] (0,0,0) -- (0,3,0) node[anchor=north west]{$y$ (left)};
    \draw[thick, ->] (0,0,0) -- (0,0,3) node[anchor=south]{$z$ (up)};


    \draw[-stealth, color=red](0) -- (P) node[anchor=west]{$r$};
    \draw[dashed, color=red] (0) -- (Pxy);
    \draw[dashed, color=red] (Pxy) -- (P);

    
    \tdplotsetcoord{Pxy}{3}{\tdplotresphi}{0}
    \tdplotgetpolarcoords{1.5}{1.5}{2.12}
    \tdplotsetthetaplanecoords{\tdplotresphi}


    \tdplotdrawarc{(0)}{1.5}{0}{\tdplotresphi}{anchor=west}{$\theta$}
    \tdplotdrawarc[dashed]{(0)}{1.5}{\tdplotresphi}{90}{anchor=west}{$\phi$}

\end{tikzpicture}

Ich möchte es so ändern, dass der beschriftete Winkel \phivon seinem aktuellen Ursprung bei Pxy zum Vektor gemessen wird r, der den Höhenwinkel ergibt. Er sollte also von Pxy in Richtung der Z-Achse gemessen und positioniert werden.

Bildbeschreibung hier eingeben

Antwort1

Laut Seite 27 der Anleitung muss dazu auf eine gedrehte Ebene gewechselt werden.

\documentclass[tikz,border=2mm]{standalone}
\usepackage{tikz-3dplot}
\begin{document}
\tdplotsetmaincoords{60}{45}
\begin{tikzpicture}[tdplot_main_coords]

    \coordinate (0) at (0,0,0);
    \tdplotsetcoord{P}{3}{45}{45} 


    \draw[thick, ->] (0,0,0) -- (3,0,0) node[anchor=north east]{$x$ (front)};
    \draw[thick, ->] (0,0,0) -- (0,3,0) node[anchor=north west]{$y$ (left)};
    \draw[thick, ->] (0,0,0) -- (0,0,3) node[anchor=south]{$z$ (up)};


    \draw[-stealth, color=red](0) -- (P) node[anchor=west]{$r$};
    \draw[dashed, color=red] (0) -- (Pxy);
    \draw[dashed, color=red] (Pxy) -- (P);
    
    \tdplotgetpolarcoords{1.5}{1.5}{2.12}
    \tdplotsetcoord{Pxy}{3}{\tdplotresphi}{0}
    \tdplotsetthetaplanecoords{\tdplotresphi}


    \tdplotdrawarc{(0)}{1.5}{0}{\tdplotresphi}{anchor=west}{$\theta$}
    %\tdplotdrawarc[dashed]{(0)}{1.5}{\tdplotresphi}{90}{anchor=west}{$\phi$}
    
    \tdplotsetthetaplanecoords{\tdplotresphi}
    \tdplotdrawarc[tdplot_rotated_coords,dashed]{(0,0,0)}{1.5}{90}%
        {\tdplotresphi}{anchor=west}{$\phi$}


\end{tikzpicture}    
\end{document}

Bildbeschreibung hier eingeben

verwandte Informationen