如何根据红点绘制椭圆?

如何根据红点绘制椭圆?
\documentclass[pstricks]{standalone}
\usepackage{pst-node,multido}%
\begin{document}
%\multido{\rA=180+1}{180}{%
\begin{pspicture}[showgrid](-4,-4)(4,4)
\pscircle{3}
\pnode(3;180){A} 
\pscircle(A){.5}
\rput(A){\pnode(.5;180){B}}
\psline(A)(B)
\psellipse(3.5,2.5) %% <<-- I think so!
\psdot(A)
\psdot*[linecolor=red](B)
\end{pspicture}
%}
\end{document}

在此处输入图片描述

问题:

如何创建如下动画:

在此处输入图片描述

在此处输入图片描述

在此处输入图片描述

答案1

\documentclass[pstricks]{standalone}
\usepackage{pst-node,multido}%
\begin{document}
\multido{\iA=180+5}{72}{%
  \begin{pspicture}[showgrid](-4,-4)(4,4)
    \pscircle{3}
    \pnode(3;\iA){A} 
    \pscircle(A){.5}
    \rput(A){\pnode(.5;-\iA){B}}
    \psline{*-}(A)(B)
    \psellipse[linecolor=black!10](3.5,2.5)
    \psdot*[linecolor=red](B)
    \psellipticarc[linecolor=red,linewidth=2pt](0,0)(3.5,2.5){180}{(B)}
  \end{pspicture}%
}
\end{document}

在此处输入图片描述

答案2

像这样吗?

\documentclass[tikz,border=3.14mm]{standalone}
\begin{document}
\foreach \X in {180,185,...,540}
{\begin{tikzpicture}
 \path[use as bounding box] (-4.2,-3.2) rectangle (4.2,3.2);
 \draw[semithick] circle[x radius=3.5cm,y radius=2.5cm];
 \fill (\X:3.5 and 2.5) coordinate (A) circle[radius=2pt];
 \draw (A) circle[radius=0.5cm] --++ (-\X:0.5) coordinate (C);
 \draw[fill=red] (C) circle[radius=2pt];
 \draw[red!20] (-3.5,0) + (-180:0.5) arc(-180:180:4cm and 2cm);
 \ifnum\X<360
  \clip (-4.5,0) -- (C|-0,0) -- (C|- 0,-3.1) -- (-4.1,-3.1) -- cycle;
 \else
  \clip (-4.5,0) -- (C|-0,0) -- (C|- 0,3.1) -- (4.5,3.1) 
   -- (4.5,-3.1) -- (-4.1,-3.1) -- cycle;
 \fi
 \draw[semithick,red] (-3.5,0) + (-180:0.5) arc(-180:180:4cm and 2cm);
\end{tikzpicture}}
\end{document}

在此处输入图片描述

相关内容