通过定义点的椭圆

通过定义点的椭圆

我想根据三个点(即 (20,20)、(-40,0) 和 (0,-40))来 (近似) 一个椭圆。我知道这个椭圆旋转了 45 度,因此椭圆的主轴相对于 x 轴逆时针旋转了 45 度,但我不知道椭圆的中心。

根据这些信息,我认为不可能确定椭圆的确切表达式。而且因为我不知道椭圆的中心,所以我无法使用\draw\pgfpathellipse命令。不过,我认为 Tikz 应该能够通过这些点近似椭圆?

答案1

由于这是一个未确定的椭圆,所以只能猜测

\begin{tikzpicture}
\node[circle,fill,inner sep=2pt](a) at (2,2) {};
\node[circle,fill,inner sep=2pt](b) at (-4,0) {};
\node[circle,fill,inner sep=2pt](c) at (0,-4) {};

\pgfpathmoveto{\pgfpoint{20mm}{20mm}}
\pgfpatharcto{30.5mm}{60mm}{0}{1}{1}{ \pgfpoint{0mm}{-40mm} }
\pgfusepath{draw}
\end{tikzpicture}

在此处输入图片描述

相关内容