任意の角度で回転した楕円に対してパラメータ化された方程式を使用してみることができます。
x = h + a*cos(t)*cos(phi) - b*sin(t)*sin(phi) [1]
y = k + b*sin(t)*cos(phi) + a*cos(t)*sin(phi) [2]
...ここで、楕円は中心 (h,k) の長半径 a と短半径 b を持ち、角度 phi だけ回転します。
次に、勾配 = 0 を微分して解くことができます。
0 = dx/dt = -a*sin(t)*cos(phi) - b*cos(t)*sin(phi)
=>
tan(t) = -b*tan(phi)/a [3]
これにより、t の多くのソリューションが得られます (そのうちの 2 つに興味があります)。それを [1] に戻して、最大 x と最小 x を取得します。
[2] について繰り返します。
0 = dy/dt = b*cos(t)*cos(phi) - a*sin(t)*sin(phi)
=>
tan(t) = b*cot(phi)/a [4]
例を試してみましょう:
(0,0) で a=2、b=1 の楕円を PI/4 で回転させたものを考えてみましょう。
[1] =>
x = 2*cos(t)*cos(PI/4) - sin(t)*sin(PI/4)
[3] =>
tan(t) = -tan(PI/4)/2 = -1/2
=>
t = -0.4636 + n*PI
t = -0.4636 と t = -3.6052 に関心があります。
したがって、次のようになります。
x = 2*cos(-0.4636)*cos(PI/4) - sin(-0.4636)*sin(PI/4) = 1.5811
と
x = 2*cos(-3.6052)*cos(PI/4) - sin(-3.6052)*sin(PI/4) = -1.5811