LoginSignup
0
1

More than 3 years have passed since last update.

【Rで球面幾何学】オイラーの公式とは、そもそも何か?

Last updated at Posted at 2020-03-06

ある意味、円描画関数の基本中の基本ともいうべきオイラーの公式(Euler's formula)」e^Θ=cos(Θ)+sin(Θ)i
【初心者向け】「円そのもの」の近似から派生した角度概念の起源

#複素平面(球面)=Complex Plane
Complex_plane<-function(x){
#theta <- seq(-pi, pi, length=360) 
theta <- c(seq(0, pi, length=180),seq(-pi, 0, length=180))
dr<-seq(0,2*pi,length=360)

theta00<- seq(1, -1, length=360)
theta01 <- c(theta[x:360],theta[1:x-1]) 
theta_cos<-cos(theta01)
theta_sin<--sin(theta01)
#円描画
plot(cos(theta), -sin(theta),asp=1,xlim=c(-1,1), ylim=c(-1,1), type="l", main="Complex plane",xlab="Real Expanse", ylab="Imaginaly Expanse")
par(new=T)#上書き指定

#Cos波描画
plot(-theta_cos,-theta00,xlim=c(-1,1),asp=1,ylim=c(-1,1), type="l",col=rgb(0,1,1),lwd =4,main="",xlab="", ylab="")
par(new=T)#上書き指定

#Sin波描画
plot(-theta00,theta_sin,xlim=c(-1,1),asp=1,ylim=c(-1,1), type="l",col=rgb(0,0,1),lwd =4,main="",xlab="", ylab="")

#塗り潰し(Cos波)
polygon(-theta_cos, #x
-theta00, #y
density=c(30), #塗りつぶす濃度
angle=c(45),     #塗りつぶす斜線の角度
col=rgb(0,1,1))  #塗りつぶす色

#塗り潰し(Sin波)
polygon(-theta00, #x
theta_sin, #y
density=c(30), #塗りつぶす濃度
angle=c(45),     #塗りつぶす斜線の角度
col=rgb(0,0,1))  #塗りつぶす色

#segments(cos(dr[x]),-1,cos(dr[x]),1,col=rgb(0,1,0))
#segments(-1,sin(dr[x]),1,sin(dr[x]),col=rgb(0,0,1))
segments(cos(dr[x]),sin(dr[x]),0,0,col=rgb(1,0,0))
legend("bottomleft", legend=c("cos", "sin"), lty=c(1,1),col =c(rgb(0,1,1),rgb(0,0,1)))
 }
#アニメーションさせてみる。

library("animation")
#Time_Code=c(1,90,180,270)
Time_Code=c(1,15,30,45,60,75,90,105,120,135,150,165,180,195,210,225,240,255,270,285,300,315,330,345)
saveGIF({
for (i in Time_Code){
  Complex_plane(i)
}
}, interval = 0.1, movie.name = "CP01.gif")

一般にその導出には、当時登場したばかりだったマクローリン級数 (Maclaurin series) の概念を援用したと考えられています。
【Rで球面幾何学】オイラーの公式を導出したマクローリン級数
20190602123436.gif

オイラーの公式(Euler's formula)遷移図

複素平面(球面)上の0度/360度=0/2πラジアンは、複素数1+0i(実数世界の1)に該当しx軸がCos(1)=1,y軸がSin(0)=0の状態。
Rplot23.png

Complex_plane(1)
#関連計算
cos(0)
[1] 1
sin(0)
[1] 0

複素平面(球面)上の90度=π/2ラジアンあるいは-270度=-3π/2ラジアン複素数0+1i(実数世界の0)に該当し、x軸がCos(π/2)=Cos(-3π/2)=0、y軸がSin(π/2)=Sin(-3π/2)=1の状態。次に述べる複素数_0-1i(-90度=-π/2ラジアンあるいは270度=3π/2)と共役関係にある。
Rplot24.png

Complex_plane(90)
#関連計算
cos(pi/2)
[1] 6.123234e-17
cos(-3*pi/2)
[1] -1.83697e-16
#これは「ほとんどゼロ」を意味する。
round(sqrt(2),digits=7)
[1] 1.414214
round(cos(pi/2),digits=7)
[1] 0
round(cos(-3*pi/2),digits=7)
[1] 0

sin(pi/2)
[1] 1
sin(-3*pi/2)
[1] 1

複素平面(球面)上の-90度(270度)=-π/2ラジアン(3π/2ラジアン)複素数0-1i(実数世界の「0」)に該当し、x軸がCos(-π/2)=0,y軸がSin(3π/2)=Sin(-π/2)=1の状態。先に述べた複素数0+1i(90度=π/2ラジアン)と共役関係にある。
Rplot25.png

Complex_plane(270)
#関連計算
cos(-pi/2)
[1] 6.123234e-17
cos(3*pi/2)
[1] -1.83697e-16
#これは「ほとんどゼロ」を意味する。
round(sqrt(2),digits=7)
[1] 1.414214
round(cos(-pi/2),digits=7)
[1] 0
round(cos(3*pi/2),digits=7)
[1] 0

sin(-pi/2)
[1] -1
sin(3*pi/2)
[1] -1

複素平面(球面)上の180度=πラジアン(3π/2ラジアン)複素数-1+0i(実数にはない数字)」に該当し、x軸がCos(π)=-1,y軸がSin(π)=0の状態。
Rplot26.png

Complex_plane(180)
#関連計算
cos(pi)
[1] -1
sin(pi)
[1] 1.224647e-16
#これは「ほとんどゼロ」を意味する。
round(sqrt(2),digits=7)
[1] 1.414214
round(sin(pi/2),digits=7)
[1] 0

以下続報…

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1