Überarbeitungsverlauf[Zurück]
Klicke auf Einblenden/Ausblenden von Überarbeitungen 5
Die Links, die im Editor noch korrekt sind werden von der automatischen Link-Erkennung in der Anzeige versaut!

27 Mär '15, 10:33

saputello's gravatar image

saputello
11.1k174365

3d Orbits um Sphäre mit Koordinaten oder Punkten auf Umlaufbahn

Moin, die Frage steht auch auf Englisch zur Verfügung: "3D Orbits around Sphere, arc points or orbit coordinates pos" auf [`latex-community.org`](http://www.latex-community.org/forum/viewtopic.php?f=45&t=26046) [`latex-community`](http://www.latex-community.org/forum/viewtopic.php?f=45&t=26046) und [`tex.stachexchange.org`](http://tex.stackexchange.com/questions/234972/3d-orbits-around-sphere-arc-points-or-orbit-coordinates-positioning). [`tex.stachexchange`](http://tex.stackexchange.com/questions/234972/3d-orbits-around-sphere-arc-points-or-orbit-coordinates-positioning). Außerdem als [Projekt auf In overleaf (ehemals writelatex)](https://www.overleaf.com/2433347sbhpck#/6330259/) sofern zugänglich. Nun zum Problem: ---------------- Das Problem ist die `path`-Umgebung, die die Pläne nicht erkennt bzw. nur den einen und zwar den des ersten Orbits und dessen Subspur, blau und grün. Die Punkte Blau und Schwarz sind somit leicht zu platzieren. Leider funktioniert das nicht für andere Pläne. Zu finden ist das Problem in den Zeilen weiter unten unter `###-problem-###`. Die orangenen Punkte sollten also eigentlich auf den roten Linien liegen, da wo `O` und `o` sind. Leider verstehe ich nicht warum das Ganze nicht funktioniert, zudem da auch die Änderung von `\path` zu `\draw` keinen Unterschied macht – genauso wenig wie die Änderung von `orbplanetwo` zu `xzplane` – ist das Ganze etwas merkwürdig. Da dies nur das Minimalbeispiel ist und noch einiges in der Grafik hinzukommt, ist das manuelle Setzen der Punkte nicht gerade nützlich. Ich freue mich über jede Unterstützung und seien es nur Vorschläge. \documentclass{article} \usepackage{tikz, tikz-3dplot} \usetikzlibrary{calc,fadings,decorations.pathreplacing} %% helper macros \newcommand{\pgfmathsinandcos}[3]{% \pgfmathsetmacro#1{sin(#3)}% \pgfmathsetmacro#2{cos(#3)}% } \newcommand{\LongitudePlane}[3][current plane]{% \pgfmathsinandcos\sinEl\cosEl{#2} % elevation \pgfmathsinandcos\sint\cost{#3} % azimuth \tikzset{#1/.style={cm={\cost,\sint*\sinEl,0,\cosEl,(0,0)}}} } \newcommand{\LatitudePlane}[3][current plane]{% \pgfmathsinandcos\sinEl\cosEl{#2} % elevation \pgfmathsinandcos\sint\cost{#3} % latitude \pgfmathsetmacro\yshift{\cosEl*\sint} \tikzset{#1/.style={cm={\cost,0,0,\cost*\sinEl,(0,\yshift)}}} % } \newcommand{\OrbitPlane}[3][current plane]{% \pgfmathsinandcos\sinEl\cosEl{#2} % elevation \pgfmathsinandcos\sint\cost{#3} % azimuth \tikzset{#1/.style={cm={\cost,\sint*\sinEl,0,\cosEl,(0,0)}}} } \newcommand{\DrawLongitudeCircle}[2][1]{ \LongitudePlane{\angEl}{#2} \tikzset{current plane/.prefix style={scale=#1}} % angle of "visibility" \pgfmathsetmacro\angVis{atan(sin(#2)*cos(\angEl)/sin(\angEl))} % \draw[current plane] (\angVis:1) arc (\angVis:\angVis+180:1); \draw[current plane,dashed] (\angVis-180:1) arc (\angVis-180:\angVis:1); } \newcommand{\DrawLatitudeCircle}[2][1]{ \LatitudePlane{\angEl}{#2} \tikzset{current plane/.prefix style={scale=#1}} \pgfmathsetmacro\sinVis{sin(#2)/cos(#2)*sin(\angEl)/cos(\angEl)} % angle of "visibility" \pgfmathsetmacro\angVis{asin(min(1,max(\sinVis,-1)))} \draw[current plane] (\angVis:1) arc (\angVis:-\angVis-180:1); \draw[current plane,dashed] (180-\angVis:1) arc (180-\angVis:\angVis:1); } \newcommand{\DrawOrbitCircle}[2][1]{ \OrbitPlane{\angEl-8}{#2} % orbit kippen!!! \tikzset{current plane/.prefix style={scale=#1}} % angle of "visibility" \pgfmathsetmacro\angVis{atan(sin(#2)*cos(\angEl)/sin(\angEl))} % % original \draw[current plane] (\angVis:1) arc (\angVis:\angVis+180:1); % sichtbarkeit des vor der kugel befindlichen bereichs \draw[current plane,dashed] (\angVis-180:1) arc (\angVis-180:\angVis:1); } % achtung unten auch eine winkeländerung !!!??? %% document-wide tikz options and styles \tikzset{% >=latex, % option for nice arrows inner sep=0pt,% outer sep=2pt,% mark coordinate/.style={inner sep=0pt,outer sep=0pt,minimum size=3pt,fill=black,circle}% } \begin{document} \begin{tikzpicture} %% some definitions \def\R{4} % sphere radius \def\rr{5} % orbit radius? \def\angEl{35} % elevation angle \def\angAz{-105} % azimuth angle \def\angPhi{-40} % longitude of point P \def\angBeta{25} % latitude of point P %###################################################################### %% working planes \pgfmathsetmacro\H{\R*cos(\angEl)} % distance to north pole \tikzset{xyplane/.style={cm={cos(\angAz),sin(\angAz)*sin(\angEl),-sin(\angAz),cos(\angAz)*sin(\angEl),(0,-\H)}}} \LongitudePlane[xzplane]{\angEl}{\angAz} \LongitudePlane[pzplane]{\angEl}{\angPhi} \LongitudePlane[yzplane]{\angEl}{\angAz+90} \LatitudePlane[equator]{\angEl}{0} \OrbitPlane[orbplanetwo]{\angEl-8}{\angAz} % dem orbit oben und unten winkel anpassen \OrbitPlane[orbplane]{\angEl-8}{\angAz+60} % dem orbit oben und unten winkel anpassen %###################################################################### %% draw xyplane and sphere \fill[ball color=white!50!gray] (0,0) circle (\R); % 3D lighting effect \draw[white] (0,0) circle (\R); %% characteristic points \path[orbplane] (\angBeta+10:\R/1) coordinate[mark coordinate,color=black] (P1); % works fine \path[orbplane] (\angBeta+10:\rr/1) coordinate[mark coordinate,color=blue] (P2); % works fine %#############################-problem-######################################### \path[orbplanetwo] (\angPhi+50:\R/1) coordinate[mark coordinate,color=orange] (A1); % not at the expected position ??? \path[orbplanetwo] (\angBeta:\rr/1) coordinate[mark coordinate,color=orange] (A2); % not at the expected position ??? %##-wanted position of the orange dots-##### \node at (-0.93,0) {o}; \node at (-1.15,0.05) {O}; %###################################################################### % Äquator, Orbit, Subspur etc. %% draw meridians and latitude circles \DrawLatitudeCircle[\R,yellow]{0} % equator \DrawOrbitCircle[\rr,cyan]{\angAz+60} % orbit plane drehen !!! \DrawOrbitCircle[\R,green]{\angAz+60} % orbit subspur !!! \DrawOrbitCircle[\rr,red]{\angAz} % orbit plane drehen !!! \DrawOrbitCircle[\R,red]{\angAz} % orbit subspur !!! \end{tikzpicture} \end{document} ![alt text][1] [1]: http://texwelt.de/wissen/upfiles/EOS-test2.jpg
Klicke auf Einblenden/Ausblenden von Überarbeitungen 4
Rechschreibung, Markdown, Lesbarkeit

26 Mär '15, 13:21

saputello's gravatar image

saputello
11.1k174365

3d Orbits um Sphäre mit Koordinaten oder Punkten auf Umlaufbahn

Moin, die frage Frage steht auch auf englisch Englisch zur verfügung: http://www.latex-community.org/forum/viewtopic.php?f=45&t=26046 und http://tex.stackexchange.com/questions/234972/3d-orbits-around-sphere-arc-points-or-orbit-coordinates-positioning Verfügung: "3D Orbits around Sphere, arc points or orbit coordinates pos" auf [`latex-community.org`](http://www.latex-community.org/forum/viewtopic.php?f=45&t=26046) und [`tex.stachexchange.org`](http://tex.stackexchange.com/questions/234972/3d-orbits-around-sphere-arc-points-or-orbit-coordinates-positioning). Außerdem als [Projekt auf In overleaf (ehemals writelatex) writelatex)](https://www.overleaf.com/2433347sbhpck#/6330259/) sofern zugänglich: https://www.overleaf.com/2433347sbhpck#/6330259/ zugänglich. Nun zum Problem.<br /> Problem: ---------------- Das problem Problem ist die path umgebung `path`-Umgebung, die die Pläne nicht erkennt bzw. nur den einen, einen und zwar den des ersten orbits Orbits und dessen subspur, Subspur, blau und grün. Die Punkte Blau und Schwarz sind somit leicht zu platzierung, leider platzieren. Leider funktioniert das nicht für andere Pläne.<br /> Pläne. Zu finden ist das Problem in den Zeilen weiter unten unter ###-problem-###<br /> `###-problem-###`. Die Orangenen orangenen Punkte sollten also eigentlich auf den roten linien Linien liegen, da wo O undo sind. <br /> `O` und `o` sind. Leider verstehe ich nicht warum das ganze Ganze nicht funktioniert, zudem da auch die änderung Änderung von path `\path` zu draw `\draw` keinen unterschied macht, Unterschied macht – genauso wenig wie die änderung Änderung von orbplanetwo `orbplanetwo` zu xzplane `xzplane` – ist das ganze Ganze etwas merkwürdig. <br /> merkwürdig. Da dies nur das minimalbeispiel Minimalbeispiel ist und noch einiges in der grafik hinzukommt Grafik hinzukommt, ist das manuelle setzen Setzen der punkte Punkte nicht gerade nützlich. <br /> nützlich. Ich freue mich über jede unterstützung Unterstützung und seien es nur vorschläge. Vorschläge. \documentclass{article} \usepackage{tikz, tikz-3dplot} \usetikzlibrary{calc,fadings,decorations.pathreplacing} %% helper macros \newcommand{\pgfmathsinandcos}[3]{% \pgfmathsetmacro#1{sin(#3)}% \pgfmathsetmacro#2{cos(#3)}% } \newcommand{\LongitudePlane}[3][current plane]{% \pgfmathsinandcos\sinEl\cosEl{#2} % elevation \pgfmathsinandcos\sint\cost{#3} % azimuth \tikzset{#1/.style={cm={\cost,\sint*\sinEl,0,\cosEl,(0,0)}}} } \newcommand{\LatitudePlane}[3][current plane]{% \pgfmathsinandcos\sinEl\cosEl{#2} % elevation \pgfmathsinandcos\sint\cost{#3} % latitude \pgfmathsetmacro\yshift{\cosEl*\sint} \tikzset{#1/.style={cm={\cost,0,0,\cost*\sinEl,(0,\yshift)}}} % } \newcommand{\OrbitPlane}[3][current plane]{% \pgfmathsinandcos\sinEl\cosEl{#2} % elevation \pgfmathsinandcos\sint\cost{#3} % azimuth \tikzset{#1/.style={cm={\cost,\sint*\sinEl,0,\cosEl,(0,0)}}} } \newcommand{\DrawLongitudeCircle}[2][1]{ \LongitudePlane{\angEl}{#2} \tikzset{current plane/.prefix style={scale=#1}} % angle of "visibility" \pgfmathsetmacro\angVis{atan(sin(#2)*cos(\angEl)/sin(\angEl))} % \draw[current plane] (\angVis:1) arc (\angVis:\angVis+180:1); \draw[current plane,dashed] (\angVis-180:1) arc (\angVis-180:\angVis:1); } \newcommand{\DrawLatitudeCircle}[2][1]{ \LatitudePlane{\angEl}{#2} \tikzset{current plane/.prefix style={scale=#1}} \pgfmathsetmacro\sinVis{sin(#2)/cos(#2)*sin(\angEl)/cos(\angEl)} % angle of "visibility" \pgfmathsetmacro\angVis{asin(min(1,max(\sinVis,-1)))} \draw[current plane] (\angVis:1) arc (\angVis:-\angVis-180:1); \draw[current plane,dashed] (180-\angVis:1) arc (180-\angVis:\angVis:1); } \newcommand{\DrawOrbitCircle}[2][1]{ \OrbitPlane{\angEl-8}{#2} % orbit kippen!!! \tikzset{current plane/.prefix style={scale=#1}} % angle of "visibility" \pgfmathsetmacro\angVis{atan(sin(#2)*cos(\angEl)/sin(\angEl))} % % original \draw[current plane] (\angVis:1) arc (\angVis:\angVis+180:1); % sichtbarkeit des vor der kugel befindlichen bereichs \draw[current plane,dashed] (\angVis-180:1) arc (\angVis-180:\angVis:1); } % achtung unten auch eine winkeländerung !!!??? %% document-wide tikz options and styles \tikzset{% >=latex, % option for nice arrows inner sep=0pt,% outer sep=2pt,% mark coordinate/.style={inner sep=0pt,outer sep=0pt,minimum size=3pt,fill=black,circle}% } \begin{document} \begin{tikzpicture} %% some definitions \def\R{4} % sphere radius \def\rr{5} % orbit radius? \def\angEl{35} % elevation angle \def\angAz{-105} % azimuth angle \def\angPhi{-40} % longitude of point P \def\angBeta{25} % latitude of point P %###################################################################### %% working planes \pgfmathsetmacro\H{\R*cos(\angEl)} % distance to north pole \tikzset{xyplane/.style={cm={cos(\angAz),sin(\angAz)*sin(\angEl),-sin(\angAz),cos(\angAz)*sin(\angEl),(0,-\H)}}} \LongitudePlane[xzplane]{\angEl}{\angAz} \LongitudePlane[pzplane]{\angEl}{\angPhi} \LongitudePlane[yzplane]{\angEl}{\angAz+90} \LatitudePlane[equator]{\angEl}{0} \OrbitPlane[orbplanetwo]{\angEl-8}{\angAz} % dem orbit oben und unten winkel anpassen \OrbitPlane[orbplane]{\angEl-8}{\angAz+60} % dem orbit oben und unten winkel anpassen %###################################################################### %% draw xyplane and sphere \fill[ball color=white!50!gray] (0,0) circle (\R); % 3D lighting effect \draw[white] (0,0) circle (\R); %% characteristic points \path[orbplane] (\angBeta+10:\R/1) coordinate[mark coordinate,color=black] (P1); % works fine \path[orbplane] (\angBeta+10:\rr/1) coordinate[mark coordinate,color=blue] (P2); % works fine %#############################-problem-######################################### \path[orbplanetwo] (\angPhi+50:\R/1) coordinate[mark coordinate,color=orange] (A1); % not at the expected position ??? \path[orbplanetwo] (\angBeta:\rr/1) coordinate[mark coordinate,color=orange] (A2); % not at the expected position ??? %##-wanted position of the orange dots-##### \node at (-0.93,0) {o}; \node at (-1.15,0.05) {O}; %###################################################################### % Äquator, Orbit, Subspur etc. %% draw meridians and latitude circles \DrawLatitudeCircle[\R,yellow]{0} % equator \DrawOrbitCircle[\rr,cyan]{\angAz+60} % orbit plane drehen !!! \DrawOrbitCircle[\R,green]{\angAz+60} % orbit subspur !!! \DrawOrbitCircle[\rr,red]{\angAz} % orbit plane drehen !!! \DrawOrbitCircle[\R,red]{\angAz} % orbit subspur !!! \end{tikzpicture} \end{document} ![alt text][1] [1]: http://texwelt.de/wissen/upfiles/EOS-test2.jpg
Klicke auf Einblenden/Ausblenden von Überarbeitungen 3

26 Mär '15, 12:28

startrucky's gravatar image

startrucky
29113

Klicke auf Einblenden/Ausblenden von Überarbeitungen 2

26 Mär '15, 11:31

startrucky's gravatar image

startrucky
29113

Klicke auf Einblenden/Ausblenden von Überarbeitungen 1

26 Mär '15, 11:19

startrucky's gravatar image

startrucky
29113