2

I was hoping someone might be able to give some helpful advice.

I've seen this question popping up a few times on the forum, but I just find all the answers too complicated and difficult to follow.

I am hoping to draw several diagrams illustrating the celestial sphere with great circles indicating the horizon, the celestial equator, and the ecliptic. Of course these diagrams will need to be annotated.

To me, personally, I wish I could simply use a package where I specify what that the angles are between each circle, the points (in ecliptic or equatorial degrees) where they intersect, and then specificy for each separate diagram how Latex is to rotate the sphere for each demonstration of a topic I wish to discuss.

As an example, i wish I could specify Latex to draw a sphere of a certain diameter. Then to add three great circles at perpendicular angles (the horizon, meridian, and prime vertical). Then add the equatorial equator with /phi being the angle above the horizon, and then add the ecliptic that will be cutting the ecliptic at Aries and Libra points.

To do this would seem to be a very simple thing to do, but I've seen suggestions of using tikz, tikz-3dplot, etc etc, and they are incredibly complicated to do, especially for newbies to Latex like myself.

Are there no other packages out there that are easier to use than these ones? Or does anyone have any macro's for these types of diagrams?

Below is an example of the detail that I need my diagrams to be in.Of course, I would like to have a way to do a rotation of this sphere in an easy way without having to redraw it every time.

enter image description here

2

1 Answer 1

4

You can use 3dtools.

\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{3dtools,calc}% https://github.com/marmotghost/tikz-3dtools
\begin{document}
\begin{tikzpicture}[3d/install view={phi=70,theta=75},declare function={R=3;}] \path    (0,0,0) coordinate (O)
    (0,0,-R) coordinate (S)
    (0,0,R) coordinate (N)  ;
    \draw[3d/screen coords,blue] (O) circle[radius=R]; 
    \path pic[green]{3d/circle on sphere={R=R,C={(O)},n={(0,0,1)}}}
pic[red]{3d/circle on sphere={R=R,C={(O)},n={(0,1,0)}}}
pic[]{3d/circle on sphere={R=R,C={(O)},n={(1,0,0)}}}
;
\foreach \p in {S,N,O}
\draw[fill=black] (\p) circle (1.2 pt);
\foreach \p/\g in {S/90,N/-90,O/-90}
\path (\p)+(\g:3mm) node{$\p$};     
    \end{tikzpicture}
\end{document} 

enter image description here

6
  • This definately seems the most promising of all the suggestions I've ever see. However, I tried to follow the instructions of installing 3d-tools (I placed the file in the same directory as my file ---- I simply copy and pasted your code to do a trial run), but I get an error message saying: "l.2 \usetikzlibrary{3dtools,calc} % github.com/marmotghost/tikz-3dtools ? " Commented May 24 at 10:11
  • Do you put tikzlibrary3dtools.code.tex file in the same directory as your file? Commented May 24 at 11:29
  • Ok, I just got it to work....was having a bit of a senile moment there :) It's working perfectly now: this seems to be exactly the package I needed! To figure out how to change the angles of the great circles and how to adjust the labels, which manual would you recommend I consult? Is it in the TikZ one? And will it explain the coordinate system in detail? I'll have to sit for a few days and figure out how to do this and work the system: as I said, I am still very much a newbie! Thank you again for your help! Commented May 24 at 12:44
  • For example: \path pic[green]{3d/circle on sphere={R=R,C={(O)},n={(0,0,1)}}} This mean the green circle is radius = R, the centre is at O, but what is "n" and what is each number (the 0,0,1) referring to? Commented May 24 at 12:48
  • n is normal vector of the plane passing O and cut sphere. You can see here Commented May 24 at 14:43

Not the answer you're looking for? Browse other questions tagged .