如何在保持正确摄像机角度的同时移动 3D 物体

如何在保持正确摄像机角度的同时移动 3D 物体

这是将表面点投影到复平面上的黎曼球。有人能告诉我如何将球体移动到= 1?我还想移动与球体相关的所有其他物体,例如球体内部的矢量和圆弧,同时保留角度。

在此处输入图片描述

\documentclass[tikz,border=3mm]{standalone}
% based on 
% https://tex.stackexchange.com/a/38995/121799 
% https://tex.stackexchange.com/a/76216 
% https://tex.stackexchange.com/a/59168/194703 
% https://tex.stackexchange.com/q/448920/194703 
\makeatletter 
\tikzset{ 
reuse path/.code={\pgfsyssoftpath@setcurrentpath{#1}} 
} 
\tikzset{even odd clip/.code={\pgfseteorule}, 
protect/.code={ 
\clip[overlay,even odd clip,reuse path=#1] 
(current bounding box.south west) rectangle (current bounding box.north east)
; 
}} 
\makeatother 
\usetikzlibrary{3d,arrows.meta,decorations.markings,perspective}
\tikzset{->-/.style={decoration={% https://tex.stackexchange.com/a/39282/194703
  markings,
  mark=at position #1 with {\arrow{>}}},postaction={decorate}},
  ->-/.default=0.55}

\begin{document}
\pgfmathsetmacro{\myaz}{15}
\makeatletter 
\tikzset{ 
reuse path/.code={\pgfsyssoftpath@setcurrentpath{#1}} 
} 
\tikzset{even odd clip/.code={\pgfseteorule}, 
protect/.code={ 
\clip[overlay,even odd clip,reuse path=#1] 
(current bounding box.south west) rectangle (current bounding box.north east)
; 
}} 
\makeatother 
\usetikzlibrary{3d,arrows.meta,decorations.markings,perspective}
\tikzset{->-/.style={decoration={% https://tex.stackexchange.com/a/39282/194703
  markings,
  mark=at position #1 with {\arrow{>}}},postaction={decorate}},
  ->-/.default=0.55}

\begin{tikzpicture}[declare function={%
        stereox(\x,\y)=2*\x/(1+\x*\x+\y*\y);%
        stereoy(\x,\y)=2*\y/(1+\x*\x+\y*\y);%
        stereoz(\x,\y)=(-1+\x*\x+\y*\y)/(1+\x*\x+\y*\y);
        Px=1.75;Py=-1.5;Qx=-1.5;Qy=-1.25;amax=2.5;, bmax =.5;},scale=2.5,
        line join=round,line cap=round,
        dot/.style={circle,fill,inner sep=1pt},>={Stealth[length=1.2ex]}]
 \pgfmathsetmacro{\myaz}{15}
 \path[save path=\pathSphere]   (0,0) circle[radius=1];
 \begin{scope}[3d view={\myaz}{18}]
  \draw (-amax,amax) -- (-amax,-amax) coordinate (bl) -- (amax,-amax) 
  coordinate (br)-- (amax,amax);
  %node[above left]{$z=0$}
  ;
  \begin{scope}
   \tikzset{protect=\pathSphere}
   %Complex label
   \draw (-amax,amax) -- (amax,amax) node[below left,xshift=-2em]{$\mathds{C}$};
  \end{scope}
  \begin{scope}
  
   \clip[reuse path=\pathSphere];
   \draw[dashed] (-amax,amax) -- (amax,amax);
  \end{scope}
  \begin{scope}[canvas is xy plane at z=0]
   \draw[dashed] (\myaz:(1) arc[start angle=\myaz,end angle=\myaz+180,radius=1];
   \draw (\myaz:1) arc[start angle=\myaz,end angle=\myaz-180,radius=1];
   \path[save path=\pathPlane] (\myaz:amax) -- (\myaz+180:amax) --(bl) -- (br) -- cycle;
   \begin{scope}
    \clip[use path=\pathPlane];
    \draw[dashed,use path=\pathSphere];
   \end{scope}
   \begin{scope}
    \tikzset{protect=\pathPlane}
    \draw[use path=\pathSphere];
   \end{scope}
  \end{scope}
  \draw[->-=0.3] (Px,Py,0) node[dot,label=below:{$w$}](w){}
  -- node[auto,pos=0.3,swap]{$\pi$} ({stereox(Px,Py)},{stereoy(Px,-1)},{stereoz(Px,Py)})
   node[dot,label=below left:{$w^*$}](w*){};
  \draw[->-] (Qx,Qy,0) node[dot,label=below:{$z$}](z){}
  -- node[auto,pos=0.5]{$\pi$} ({stereox(Qx,Qy)},{stereoy(Qx,-1)},{stereoz(Qx,Qy)})
   node[dot,label=below right:{$z^*$}](z*){};
   \draw[dashed] (w*) -- (0,0,1) node[dot,label=above:{$\zeta$}](zeta){}
   -- (z*) -- (w*);
 \end{scope}
\end{tikzpicture}

相关内容