
Ziel
Verwenden vontikz-3dplot
, ich möchte dieschöner KreisDadurch wird der Umriss der Kugel mit Radius 1 umrissen, wie er vom festen Blickpunkt aus gesehen würde (mit anderen Worten, die Ebene senkrecht zum Vektor, der die Blickrichtung beschreibt), um zu vermeiden, dass andere Großkreise den Eindruck erwecken, sie würden aus dieser Kugel „herausragen“ (violette Umrisse in der Abbildung unten, die also keine Überlappung mit den anderen Großkreisen aufweist).
MWE
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb}
\usepackage[english]{babel}
\usepackage{float}
\usepackage{tikz}
\usepackage{tikz-3dplot}
%%%%%%%%
\begin{document}
\pgfmathsetmacro{\rvec}{1}
\pgfmathsetmacro{\thetavec}{54}
\pgfmathsetmacro{\phivec}{54}
\pgfmathsetmacro{\view}{135}
\tdplotsetmaincoords{75}{\view}
\definecolor{darkgreen}{rgb}{0.1,0.9,0.1}
\begin{tikzpicture}[scale=5,tdplot_main_coords]
\coordinate (O) at (0,0,0);
% Axes
\draw[thick,->] (O) -- (2.0,0,0) node[anchor=north east]{$X$};
\draw[thick,->] (O) -- (0,2.0,0) node[anchor=north west]{$Y$};
\draw[thick,->] (O) -- (0,0,1.4) node[anchor=south]{$Z$};
% Great circle in the OXZ plane
\tdplotsetthetaplanecoords{0}
\tdplotdrawarc[tdplot_rotated_coords]{(O)}{\rvec}{0}{180}{}{}
\tdplotdrawarc[tdplot_rotated_coords,loosely dashed,gray]{(O)}{\rvec}
{180}{360}{}{}
% Great circle in the OYZ plane
\tdplotsetthetaplanecoords{90}
\tdplotdrawarc[tdplot_rotated_coords]{(O)}{\rvec}{0}{180}{}{}
\tdplotdrawarc[tdplot_rotated_coords,losely dashed,gray]{(O)}{\rvec}
{180}{360}{}{}
% Great circle in the OXY plane
\tdplotdrawarc[blue]{(O)}{\rvec}{-55}{125}{}{}
\tdplotdrawarc[loosely dashed,blue]{(O)}{\rvec}{125}{305}{}{}
%% Testing great circles
% Rotated Great circle around Z-axis, this is the first wanted rotation
% to bring it in the original, non rotated "O-Y_ori-Z" plane.
\tdplotsetthetaplanecoords{\view}
\tdplotdrawarc[tdplot_rotated_coords,cyan]{(O)}{\rvec}{0}{360}{}{}
% Rotated big circle around Y-axis, this second rotation should be applied
% just after the previous one, i.e. on the great circle colored in cyan.
% How to do that ?
\tdplotsetrotatedthetaplanecoords{15}
\tdplotdrawarc[tdplot_rotated_coords,darkgreen]{(O)}{\rvec}{0}{360}{}{}
\end{tikzpicture}
\end{document}
Ergebnis des aktuellen Codes:
Ich möchte das Ergebnis der Komposition der ersten und dann der zweiten Rotation (in dieser Reihenfolge) im Testing
Teil erhalten, aber ich weiß nicht, wie ich das Tikz mitteilen kann.
Antwort1
Durch Hinzufügen dieses Elements tikzpicture
wird das beschriebene Problem gelöst:
\tdplotsetrotatedcoords{\azimuth-90}{75}{0}
\begin{scope}[tdplot_rotated_coords]
\tdplotdrawarc[red]{(O)}{\radius}{0}{360}{}{}
\end{scope}
Hier ist der resultierende Kreis (in Rot) für einen Polarwinkel von 55 Grad statt 75 Grad für einen besseren visuellen Effekt:
Das Magische entsteht durch die Verwendung der \tdplotsetrotatedcoords
Funktion: