Some days ago I posted this. The code suggested really helped me to draw some nice curves and surfaces just like I wanted, but when it came to surfaces that depended on two variables/parameters I couldn't get the code to work. For example, I'm trying to do something like this
and so I started trying to plot just the surface of one sphere. I read a lot of topics on this and it always seems to use some parameter definition using pgf, but I found a code using just TikZ that I kinda liked and tried adapting to my use case.
\begin{tikzpicture}[x={(-1.3cm,-1.3cm)},y={(2.7cm,-.3cm)},z={(0cm,2cm)}, scale=0.3, > = Straight Barb]
\draw[->] (0,0,0) -- (4,0,0) node[left] {$x$};
\draw[->] (0,0,0) -- (0,4,0) node[below] {$y$};
\draw[->] (0,0,0) -- (0,0,4) node[left] {$z$};
\foreach \x/\y in {0/0, 1/1, ..., 10/10}
{
\draw[->, ultra thick, red] ({\x}, {\y}, {(1 - {\x}**2 - {\y}**2)**(1/2)}) ;
}
\end{tikzpicture}
I put some random values for the variables just to test, but it's returning me an error
Missing number, treated as zero
I've tried changing ({\x}, {\y}, {(1 - {\x}**2 - {\y}**2)**(1/2)}) to ({\x}, {\y}, {(1 - \x**2 - \y**2)**(1/2)}) but I couldn't get rid of the error. Then I started thinking of doing something with pgf using another coordinate system, but I'm really stuck and don't know what to do and I came again to ask for help. If anyone can explain how I would get something like the image I would really appreciate it!


...syntax can deal with/. – Qrrbrbirlbel Sep 12 '22 at 18:410/0,...,5/9to do? also please post a test document not just a fragment – David Carlisle Sep 12 '22 at 18:57