山本ワールド
二次曲線の分類
標準形
上記の二次曲線の式から回転成分と移動成分を除くと次項の標準形が得られる。
楕円
a=bの時は円となる。
![\displaystyle \frac{x^2}{a^2}+\frac{y^2}{b^2}=1]()
原点を中心にx,yをθ左回転させた後の点をx',y'とすると以下の式が成り立つ。
![y'=x \sin \theta +y \cos \theta]()
![\displaystyle A=\frac{1}{a^2}]()
![\displaystyle B=\frac{1}{b^2}]()
と置くと
![A{x}^2+Bxy+C{y^2}]()
をθを回転させた式は
![A (x^2 \cos^2 \theta -2xy\cos \theta\sin \theta+ y^2 \sin^2 \theta)
+B(x \cos \theta -y \sin \theta)(x \sin \theta +y \cos \theta)
+C(x^2 \sin^2 \theta +2xy\sin \theta \cos \theta+ y^2 \cos^2 \theta)]()
![A (x^2 \cos^2 \theta -2xy\cos \theta\sin \theta+ y^2 \sin^2 \theta)
+B(x^2 \cos \theta \sin \theta+xy \cos^2 \theta -xy \sin^2 \theta-y^2 \sin \theta \cos \theta)
+C(x^2 \sin^2 \theta +2xy\sin \theta \cos \theta+ y^2 \cos^2 \theta)]()
![(A \cos^2 \theta+B \cos \theta \sin \theta +C \sin^2 \theta)x^2
+(-2A\cos \theta \sin \theta+B \cos^2 \theta-B \sin^2 \theta +2C \sin \theta \cos \theta)xy
+(A\sin^2 \theta -B\sin \theta \cos \theta+C \cos^2 \theta)y^2]()
![(A \cos^2 \theta+B \cos \theta \sin \theta +C \sin^2 \theta)x^2
+(2(-A+C)\cos \theta \sin \theta+B \cos^2 \theta-B \sin^2 \theta)xy
+(A\sin^2 \theta -B\sin \theta \cos \theta+C \cos^2 \theta)y^2]()
![(A \cos^2 \theta+B \cos \theta \sin \theta +C \sin^2 \theta)x^2
+((-A+C)\sin 2 \theta +B \cos 2 \theta)xy
+(A\sin^2 \theta -B\sin \theta \cos \theta+C \cos^2 \theta)y^2]()
![]()
![]()
xyの項を消すには![(-A+C)\sin 2 \theta +B \cos 2 \theta=0]()
![\displaystyle \frac{B}{-A+C}=\frac{\sin \theta}{\cos \theta}]()
![\displaystyle \frac{B}{-A+C}=\frac{\sin 2 \theta}{\cos 2 \theta}]()
![\displaystyle 2 \theta={\tan}^{-1} \frac{B}{-A+C}]()
![\displaystyle \theta=\frac{1}{2}{\tan}^{-1} \frac{B}{-A+C}]()
![A{x}^2+Bxy+C{y^2}+D=0]()
をxで微分するとyの変化率が0の場合すなわちyの最大最小の時のxが解ける
![2A{x}+By=0]()
![\displaystyle y=-\frac{2A{x}}{B}]()
![A{x}^2+Bxy+C{y^2}+D=0]()
![\displaystyle A{x}^2+Bx(-\frac{2A{x}}{B})+C{(-\frac{2A{x}}{B})^2}+D=0]()
![\displaystyle A{x}^2-2Ax^2+4A^2 \frac{C}{B^2}x^2+D=0]()
![\displaystyle x=\sqrt{ \frac{-D}{ -A+4A^2 \frac{C}{B^2}}}]()
![A'=C]()
![B'=Bx]()
![C'=Ax^2+D]()
![\displaystyle y=\frac{-B' \pm \sqrt{{B'}^2-4A'C'}}{2A'}]()
![A{x}^2+Bxy+C{y^2}+D=0]()
をyで微分するとxの変化率が0の場合すなわちxの最大最小の時のyが解ける
![Bx+2Cy=0]()
![\displaystyle x=-\frac{2Cy}{B}]()
![\displaystyle A(-\frac{2Cy}{B} )^2+B(-\frac{2Cy}{B})y+C{y^2}+D=0]()
![\displaystyle 4\frac{AC^2}{B^2} y^2-2 Cy^2+C{y^2}+D=0]()
![\displaystyle 4\frac{AC^2}{B^2} y^2-Cy^2+D=0]()
![\displaystyle y=\sqrt{\frac{-D}{4\frac{AC^2}{B^2} -C}}]()
![A"=A]()
![B"=By]()
![C"=Cy^2+D]()
![\displaystyle x=\frac{-B" \pm \sqrt{{B"}^2-4A"C"}}{2A"}]()
原点を中心にx,yをθ左回転させた後の点をx',y'とすると以下の式が成り立つ。
と置くと
をθを回転させた式は
xyの項を消すには
yの最大最小値を求める
をxで微分するとyの変化率が0の場合すなわちyの最大最小の時のxが解ける
xの最大最小値を求める
をyで微分するとxの変化率が0の場合すなわちxの最大最小の時のyが解ける
xとyの最大最小値を使用して外接する四角形を描画
嘘円
双曲線
赤丸が焦点、緑丸が頂点である。
双曲線とは下図用に焦点と呼ばれる2点(F1,F2)からの距離の差が一定の点Pであらわされる二次曲線の一種です。
PF1-PF2=一定
彗星が太陽の重力に引き寄せられて近づきその後永遠に遠くへ行ってしまう様な軌道です。
下図は以下の式を図化したものです。
![\displaystyle \frac{x^2}{3^2}-\frac{y^2}{4^2}=1]()
P()
![\displaystyle \frac{x^2}{a^2}-\frac{y^2}{b^2}=1]()
上式のように右辺が1の場合はy軸が対象軸となります。
青点が焦点と呼ばれます。水色の点は頂点となります。
![\displaystyle x=\sqrt{ a^2 (1+\frac{y^2}{b^2})}]()
![\displaystyle y=\sqrt{ b^2 (\frac{x^2}{a^2}-1)}]()
![(-\sqrt{ a^2+b^2 },0) \quad (\sqrt{ a^2+b^2 },0)]()
![(-a,0)\quad(a,0)]()
![\displaystyle y=-\frac{b}{a}x \quad y=\frac{b}{a}x]()
![\displaystyle \frac{x^2}{a^2}-\frac{y^2}{b^2}=-1]()
上式のように右辺が-1の場合はx軸が対象軸となります。
青点が焦点と呼ばれます。水色の点は頂点となります。
![\displaystyle x=\sqrt{ a^2 (\frac{y^2}{b^2}-1)}]()
![\displaystyle y=\sqrt{ b^2 (\frac{x^2}{a^2}+1)}]()
![(0,-\sqrt{ a^2+b^2 },0) \quad (0,\sqrt{ a^2+b^2 })]()
![(0,-b)\quad(0,b)]()
![\displaystyle y=-\frac{b}{a}x \quad y=\frac{b}{a}x]()
双曲線とは下図用に焦点と呼ばれる2点(F1,F2)からの距離の差が一定の点Pであらわされる二次曲線の一種です。
PF1-PF2=一定
彗星が太陽の重力に引き寄せられて近づきその後永遠に遠くへ行ってしまう様な軌道です。
下図は以下の式を図化したものです。
P()
y軸を対称軸とする
上式のように右辺が1の場合はy軸が対象軸となります。
青点が焦点と呼ばれます。水色の点は頂点となります。
焦点
頂点
漸近線
x軸を対称軸とする
上式のように右辺が-1の場合はx軸が対象軸となります。
青点が焦点と呼ばれます。水色の点は頂点となります。
焦点
頂点
漸近線
放物線
Pが正の時は実線、負の時は点線の曲線となります。
赤丸が焦点、赤丸を通過している直線が準線と呼びます。
放物線の標準形
ちなみに二次放物線はベジェ曲線で表せます。
放物線を描画できるAPI等は通常ないのでベジェ曲線で描画する方法を考えてみます。
Y軸に対称な放物線
頂点が原点でありy軸を対象とする±xmaxの範囲の放物線を考えてみます。
ベジェ曲線は、t(0~1)を媒介変数とすると曲線上のG(x,y)は以下の式で表せます。
始点をSx,Sy、終点をEx,Ey、制御点をCx,Cyとすると
で表せます。
二次放物線は線対称なので制御点Cxは始終点の中点となります。
t=1/2なので、y=の式を変形してCyを求めます。
yは頂点位置なので0となります。
SyとEyは以下の式で計算できます。
始終点はそれぞれ-xmax、xmaxの時の点となります。
よって、±xmaxの範囲の放物線をベジェ曲線で表すと
以上のようにシンプルな式で表せる。
X軸に対称な放物線
単純にxとyを入れ替えY軸に対称な場合を90度回転させた結果と同じになります。1点
2つの直線
平行線又は1本の線
変数が1個で表せるとき平行又は1本の線になる。
![\displaystyle Ax^2+Dx+F=0=(x-α)(x-β)]()
Copyright (C) 2012 山本ワールド All Rights Reserved.