I'm trying to replicate this figure:
Right know, I have this code:
\begin{figure}[H]
\centering
\begin{tikzpicture}[yzx, scale = 0.9]
\draw[->] (0,0,0) -- (5.5,0,0) node(x)[left]{$x$};
\draw[->] (0,0,0) -- (0,5,0) node(y)[right]{$y$};
\draw[->] (0,0,0) -- (0,0,4) node(z)[right]{$z$};
\def\px{4}; \def\py{4}; \def\pz{4};
\coordinate (o) at (0,0,0);
\coordinate (p) at (\px,\py,\pz);
\coordinate (pxy) at (\px,\py,0);
% Spherical coordinates
\begin{scope}[canvas is xy plane at z=0]
\draw[->, cadmiumorange] (2,0) arc(0:45:2) node[pos = 0.5, below]{$\phi$};
\draw[dotted, cadmiumorange] (o) -- (pxy);
\end{scope}
\draw[cadmiumorange] (o) -- (p) node[above left, pos = 0.5]{$r$};
\draw[dotted] (pxy) -- (p) node[pos = 0.5, right]{$z$};
\begin{scope}[canvas is zy plane at x=0]
\draw[->, cadmiumorange] (1,0) arc(0:45:1) node[pos = 0.5, above]{$\theta$};
\end{scope}
% x-y-z coordinates
\draw[bleudefrance] (o) -- (\px,0,0) node[above, pos = 0.5, sloped]{$x$};
\draw[bleudefrance] (\px,0,0) -- (pxy) node[pos = 0.5, below]{$y$};
% Point
\filldraw (p) circle(3pt)
node[above right]{$P(r, \theta, \phi)$}
node[below right]{$P(x,y,z)$};
\end{tikzpicture}
\caption{Coordenadas cartesianas y esf\'ericas.}
\label{c2:definiciones:esfericasB}
\end{figure}
that produces
That's all I'm able to draw by my own. I don't know how to draw this "solids" sphere and cone. The text in the first figure is in spanish but it's not needed in the answer.
The ideal asnswer to this question would be an answer like the answer of this question: How to draw the solids to refer to cylindricals coordinates. This answer is (relatively) easy to understand and modify.
I also have this in my code:
\documentclass[11pt, oneside]{book}
\usepackage{pgfplots}
\pgfplotsset{compat = newest}
\usepackage{tikz-3dplot}
\usepackage{tikz}
\usetikzlibrary{snakes, calc, quotes, babel, hobby, trees, arrows, patterns, patterns.meta, calligraphy, backgrounds, chains, shapes.geometric, shapes, angles, 3d, fillbetween,
decorations, decorations.pathreplacing,
decorations.pathmorphing, decorations.markings, decorations.text}
\tikzstyle{yzx} = [
x={(-.385cm, -.385cm)},
y={(1cm, 0cm)},
z={(0cm, 1cm)},
]
\tikzset{zxplane/.style={canvas is zx plane at y=#1,very thin}}
\tikzset{yxplane/.style={canvas is yx plane at z=#1,very thin}}
\usepackage{tkz-euclide}
\tikzset{every picture/.style = {line width = 1pt, > = Triangle},
%
%
%
set arrow inside/.code = {\pgfqkeys{/tikz/arrow inside}{#1}},
set arrow inside={end/.initial = >, opt/.initial =},
/pgf/decoration/Mark/.style = {
mark/.expanded = at position #1 with {
\noexpand\arrow[\pgfkeysvalueof{/tikz/arrow inside/opt}]{\pgfkeysvalueof{/tikz/arrow inside/end}}
}
},
arrow inside/.style 2 args = {
line width = 2pt,
set arrow inside = {#1},
postaction = {
decorate, decoration={
markings, Mark/.list = {#2}
}
}
},
}
\usepackage{physics}
\usepackage[italic = true]{derivative}
\usepackage[scr = rsfso]{mathalfa}
\usepackage{mathtools}
\usepackage{amssymb}
\definecolor{cadmiumorange}{rgb}{0.93, 0.53, 0.18}
Thanks for reading and keep helping!



tikzis a massive learning curve but fortunately it is extremely powerful and worth investing the time in (I am currently learning it). Your original image looks quite complicated indeed, I'd advise going through thetikzmanual and trying to replicate parts at a time. I doubt anyone would reproduce it for you unless they were bored to be honest, that's how "complextikzdrawing" questions tend to go – JamesT Feb 22 '23 at 19:48