如何在现有坐标系中处理球面图?

如何在现有坐标系中处理球面图?

我想按照示例 3.6.2 绘制一个球面图tikz-3D 图文档。我设法绘制了我想要的球体,但我无法将该图包含到绘制其他内容的 3D 图中。当前状态如下所示:在此处输入图片描述 我为获得此示例而编写的代码:

\documentclass[a4paper, 12pt]{report}
\usepackage{tikz} %Vektorgrafiken
\usepackage{pgfplots}
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{xcolor}
\usepackage{tikz-3dplot}


\begin{document}
\begin{figure} 
\centering
\begin{tikzpicture}[x={(-30:1cm)}, y={(30:1cm)}, z={(90:1cm)}, scale=1.0,
    >=stealth,
    inner sep=0pt, outer sep=2pt,
    axis/.style={thick,->},
    wave/.style={thick,color=#1,smooth},
    polaroid/.style={fill=black!60!white, opacity=0.3},
    ]
  
\coordinate (O) at (0, 0, 0);
\draw[axis] (6.28, 0,   0) -- +(5.72, 0,   0) node [right] {z};
\draw[axis] (O) -- +(0,  -2.5, 0) node [left] {x};
\draw[axis] (O) -- +(0,  0,   2) node [above] {y};
\draw[thick,dashed] (-2,0,0) -- (6.28, 0,   0);      

\draw[thick,dashed] (8.72, -2,  0) -- (8.72, 2,  0);    

\tdplotsetmaincoords{60}{140}  
\begin{scope}[x = {10}, y = {1}, z = {1}, scale=2,line join=bevel,tdplot_main_coords,%
    fill opacity=.5]
\tdplotsetpolarplotrange{0}{180}{0}{180}
\tdplotsphericalsurfaceplot[parametricfill]{72}{24}%
    {1}{black}{180}%
{\draw[axis] (O) -- + (0,2,0) node[anchor=north east]{$z$};}%
  {\draw[axis] (O) -- +  (2.5 ,0 ,0) node[anchor=north west]{$x$};}%
    {\draw[axis] (O) -- +(0,  0,   2)  node[anchor=south]{$y$};}%
\end{scope}
\end{tikzpicture}
\end{figure}
\end{document}

我的问题是:

  • 为什么坐标系的x轴不对齐?
  • 我如何将球体转移到我最初定义的坐标系中?
  • 如何将球体沿 z 轴移动到交线点?
  • 我怎样才能使球体完全透明?

相关内容