円錐曲線とは
出典: フリー百科事典『ウィキペディア(Wikipedia)』
円錐曲線(えんすいきょくせん、conic curve, conic section; 円錐断面)とは、円錐面を任意の平面で切断したときの断面としてえられる曲線群の総称である。
数式表現
円
\[
\begin{eqnarray}
\left\{
\begin{array}{l}
x = a \cos t \\
y = a \sin t
\end{array}
\right.
\end{eqnarray}
\tag{1}
\label{1}
\]
楕円
\[
\begin{eqnarray}
\left\{
\begin{array}{l}
x = a \cos t \\
y = b \sin t
\end{array}
\right.
\end{eqnarray}
\tag{2}
\label{2}
\]
放物線
\[
\displaystyle y = ax^2 + bx + c
\tag{3}
\label{3}
\]
双曲線
\[
\begin{eqnarray}
\left\{
\begin{array}{l}
x = \pm a \cosh t \\
y = b \sinh t
\end{array}
\right.
\end{eqnarray}
\tag{4}
\label{4}
\]
書き方
R言語での書き方は以下のとおり。
円
条件: \(a=1\) の時
t=seq(0, 2*pi, length=180)
a=1
x=a*cos(t)
y=a*sin(t)
svg("archimedes.svg", width=5, height=5)
plot(x, y, type="l", asp=1, lwd=2, col=2)
abline(h=0)
abline(v=0)
dev.off()
楕円
条件: \(a=3, b=2\) の時
t=seq(0, 2*pi, length=180)
a=3
b=2
x=a*cos(t)
y=b*sin(t)
svg("ellipse.svg", width=5, height=5)
plot(x, y, type="l", asp=1, lwd=2, col=2)
abline(h=0)
abline(v=0)
dev.off()
放物線
条件: \(a=1, b=0, c=0\) の時
a=1
b=0
c=0
svg("parabola.svg", width=5, height=5)
curve(a*x^2+b*x+c, -2, 2, asp=1, lwd=2, col=2)
abline(h=0)
abline(v=0)
dev.off()
双曲線
条件: \(a=1, b=1\) の時
a=1, b=1のとき
t=seq(-pi, pi, length=300)
a=b=1
x=a*cosh(t)
y=b*sinh(t)
svg("hyperbola.svg", width=5, height=5)
plot( x, y, type="l", asp=1, lwd=2, col=2, xlim=c(-15,15), ylim=c(-15,15), ann=F)
par(new=T)
plot(-x, y, type="l", asp=1, lwd=2, col=2, xlim=c(-15,15), ylim=c(-15,15))
abline(h=0)
abline(v=0)
dev.off()
0 件のコメント:
コメントを投稿