3D path rotations in plain TikZ

spath3tikz-3dplottikz-pgf

I apologize if this has an answer elsewhere; I've looked at many questions and could not find a solution.

Here are some of the posts I looked at (maybe they do answer it and I'm just not smart enough to see it – that's always possible):

  1. Drawing simple 3D cylinders in TikZ
  2. 3D bodies in TikZ
  3. Draw a 3D sphere with radius with TikZ?
  4. Drawing a circle on a non xy-plane with TikZ

I even looked at the rotate= option described in this article to no avail: https://latexdraw.com/rotate-a-path-around-a-point-double-pendulum-case/

My question is this: How can you rotate a TikZ path in 3D? If this is impossible, then how can you fill a 3D sphere to achieve the same effect? If both of these ideas are impossible of execution, then how can I do this? For instance, do I need to "use a sledgehammer to crack a nut" and use TikZ-3Dplot? I'm willing to do whatever it takes. Thank you in advance for your help.

As you can see, the ellipse is parallel with the xy-plane. My goal is to rotate this ellipse – or just draw it as a sphere, if possible – so that it appears as a circle to the viewer.

enter image description here

MWE:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{perspective}
\begin{document}
\begin{tikzpicture}[3d view={125}{30}, scale=4]
\draw[thick, -latex] (0,0,0) -- (2,0,0) node[pos=1,above left]{$x$};
\draw[thick, -latex] (0,0,0) -- (0,2,0) node[pos=1,below left]{$y$};
\draw[thick, -latex] (0,0,0) -- (0,0,2) node[pos=1,left]{$z$};
\node[above left] at (0,0,0) {$O$};
\draw[red,thick] (0,0,0) -- node[pos=0.5,above left] {\color{black}$a$} (0.65,0,0) -- node[pos=0.5,below left] {\color{black}$b$} (0.65,0.75,0) -- node[pos=0.5,right] {\color{black}$c$} (0.65,0.75,1.2);
\fill[red] (0.65,0.75,1.2) circle [radius=0.5];
\foreach \x in {0,0.05,...,2}{
\draw[thin] (\x,0,1.2) -- (\x,2,1.2);
\draw[thin] (0,\x,1.2) -- (2,\x,1.2);}
%\fill[red,3d view={0}{0}] (0.65,0.75,1.2) circle [radius=0.03]; % I would like to do something like this
\end{tikzpicture}
\end{document}

Thanks!

Best Answer

This one could be a (simplified) answer to Your's question:

enter image description here

Code:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{perspective}
\begin{document}
    \begin{tikzpicture}[3d view={125}{30}, scale=2]
        \draw[thick, -latex] (0,0,0) -- (4,0,0) node[pos=1,above left]{$x$};
        \draw[thick, -latex] (0,0,0) -- (0,4,0) node[pos=1,below left]{$y$};
        \draw[thick, -latex] (0,0,0) -- (0,0,4) node[pos=1,left]{$z$};
        \node[above left] at (0,0,0) {$O$};
%       \draw[red,thick] (0,0,0) -- node[pos=0.5,above left] {\color{black}$a$} (0.65,0,0) -- node[pos=0.5,below left] {\color{black}$b$} (0.65,0.75,0) -- node[pos=0.5,right] {\color{black}$c$} (0.65,0.75,1.2);
        \draw[blue] (0,0,0) circle [radius=2];
        \foreach \r in {-2,-1.9,...,2}{
        \pgfmathsetmacro{\raggio}{sqrt(4-\r*\r)}
        \fill[red,opacity=.1] (0,0,\r) circle [radius=\raggio];
        }
        
%       \foreach \x in {0,0.05,...,2}{
%           \draw[thin] (\x,0,1.2) -- (\x,2,1.2);
%           \draw[thin] (0,\x,1.2) -- (2,\x,1.2);}
        %\fill[red,3d view={0}{0}] (0.65,0.75,1.2) circle [radius=0.03]; % I would like to do something like this
    \end{tikzpicture}
\end{document}
Related Question