突出显示平面 x+z=0 切割单位球面时的交点大圆

突出显示平面 x+z=0 切割单位球面时的交点大圆

我想可视化一个单位透明球体,突出显示平面 x+z=0 与球体相交的大圆。另外,我想绘制平面。该怎么办

我的尝试:

\documentclass{article}
    \usepackage{tikz}
    \usepackage{tikz-3dplot} 
        \begin{document}
        \begin{figure}
    \centering
    \tdplotsetmaincoords{30}{70} % Viewing angle
    
    \begin{tikzpicture}[tdplot_main_coords]
    
        % sphere
        \shade[ball color=blue!50,opacity=0.4] (0,0,0) circle (1);
    
        % plane
        \def\planeXZ{0} % the x+z=0
    
        %PLane
        \filldraw[gray!30,opacity=0.8] (-1.5,0,\planeXZ) -- (1.5,0,\planeXZ) -- (1.5,0,1.5) -- (-1.5,0,1.5) -- cycle;
    
            \begin{scope}
            \clip (-1.5,0,\planeXZ) -- (1.5,0,\planeXZ) -- (1.5,0,1.5) -- (-1.5,0,1.5) -- cycle;
            \draw[red,thick] (0,0,0) circle (1);
        \end{scope}
    
        % Draw axes
        \draw[thick,->] (0,0,0) -- (1.1,0,0) node[anchor=north east]{$x$};
        \draw[thick,->] (0,0,0) -- (0,1.1,0) node[anchor=north west]{$y$};
        \draw[thick,->] (0,0,0) -- (0,0,1.1) node[anchor=south]{$z$};
    
    \end{tikzpicture}
    \end{figure}
    
    \end{document}

相关内容