0

I want to plot a sphere showing its spherical coordinates. A possible Fig is given below. I want to enhance the look of the Fig with nice colour combination.

enter image description here

I have tried the following:

\documentclass[border=0.2cm]{standalone}

\usepackage{pgfplots} \usepackage{tikz-3dplot}

\tdplotsetmaincoords{60}{115} \pgfplotsset{compat=newest}

\begin{document}

\begin{tikzpicture}[tdplot_main_coords, scale = 2.5]

% Create a point (P) \coordinate (P) at ({1/sqrt(3)},{1/sqrt(3)},{1/sqrt(3)});

% Draw shaded circle \shade[ball color = blue, %colormap/jet, opacity = 0.5 ] (0,0,0) circle (1cm);

% draw arcs \tdplotsetrotatedcoords{0}{0}{0}; \draw[dashed, tdplot_rotated_coords, gray ] (0,0,0) circle (1);

\tdplotsetrotatedcoords{90}{90}{90}; \draw[dashed, tdplot_rotated_coords, gray ] (1,0,0) arc (0:180:1);

\tdplotsetrotatedcoords{0}{90}{90}; \draw[dashed, tdplot_rotated_coords, gray ] (1,0,0) arc (0:180:1);

% Projection of the point on X and y axes \draw[thin, dashed] (P) --++ (0,0,{-1/sqrt(3)}); \draw[thin, dashed] ({1/sqrt(3)},{1/sqrt(3)},0) --++ (0,{-1/sqrt(3)},0); \draw[thin, dashed] ({1/sqrt(3)},{1/sqrt(3)},0) --++ ({-1/sqrt(3)},0,0);

% Axes in 3 d coordinate system \draw[-stealth] (0,0,0) -- (1.80,0,0) node[below,black] {$x$}; \draw[-stealth] (0,0,0) -- (0,1.30,0)node[below,black] {$y$}; \draw[-stealth] (0,0,0) -- (0,0,1.30)node[above,black] {$z$}; \draw[dashed, gray] (0,0,0) -- (-1,0,0); \draw[dashed, gray] (0,0,0) -- (0,-1,0);

% Line from the origin to (P) \draw[thick, -stealth] (0,0,0) -- (P)node[above,black] {$P$};

% Add small circle at (P) \draw[fill = blue!50] (P) circle (0.5pt);

\end{tikzpicture}

\end{document}

The above code provides the Fig below:

enter image description here

Specific questions:

  1. To plot a horizontal and a vertical circle passing through P as shown in the top Fig.
  2. To mark the angles with theta and phi
  3. To give the angle signs and right angle sign
  4. To give a different colour in the sphere-section, as mentioned in the attached top Fig.
  5. To beatify the colour combinations, keeping necessary information intact.
math131
  • 149
  • So... what is your specific question? – Raven Sep 21 '23 at 09:50
  • @Ravan Edited: Specific questions are mentioned above. – math131 Sep 21 '23 at 09:59
  • 1
    Your questions are pretty much all already answered on this site - only individually. For labelling angles: https://tex.stackexchange.com/q/20826/128658, arcs on a sphere: https://tex.stackexchange.com/q/127238/128658 (and the question linked in the comment) , right angle sign: https://tex.stackexchange.com/q/356797/128658, filling parts of the sphere surface: https://tex.stackexchange.com/q/53445/128658. The latter is also quite a general reference on how to draw stuff on spheres. Finally, "beautifying" is very subjective and can't really be answered "correctly" (not suited for this site). – Raven Sep 21 '23 at 10:09
  • @Raven Not exactly. I am unable to solve the Specific questions are mentioned above from (1) to (4) (ignoring (5) as "beautifying" is really very subjective, I agree) – math131 Sep 21 '23 at 10:22

0 Answers0