更多阅读:sppy.site
给定点集 P = { P 1 , P 2 , ⋯ , P n } \mathcal{P}=\{P_1,P_2,\cdots,P_n\} P={ P1,P2,⋯,Pn} ,求包围该点集的最小椭圆 E \mathcal{E} E 。
椭圆定义
二次曲线
一般方程
A x 2 + B x y + C y 2 + D x + E y + F = 0 Ax^2+Bxy+Cy^2+Dx+Ey+F=0 Ax2+Bxy+Cy2+Dx+Ey+F=0
对于椭圆需满足
B 2 − 4 A C < 0 B^2-4AC<0 B2−4AC<0
避免退化需满足
D 2 4 A + E 2 4 C − F > 0 \frac{D^2}{4A}+\frac{E^2}{4C}-F>0 4AD2+4CE2−F>0
参数方程
矩阵形式
[ x ( t ) y ( t ) ] = [ h k ] + [ cos ( τ ) − sin ( τ ) sin ( τ ) cos ( τ ) ] ⋅ [ a cos ( t ) b sin ( t ) ] \begin{bmatrix} x(t) \\ y(t) \end{bmatrix}= \begin{bmatrix} h \\ k \end{bmatrix}+ \left[\begin{array}{lr} \cos(\tau)&-\sin(\tau) \\ \sin(\tau)&\cos(\tau) \end{array}\right]\cdot \begin{bmatrix} a\cos(t) \\ b\sin(t) \end{bmatrix} [x(t)y(t)]=[hk]+[cos(τ)sin(τ)−sin(τ)cos(τ)]⋅[acos(t)bsin(t)]
其中, ( h , k ) (h,k) (h,k) 为椭圆中心, τ \tau