以下ではサラッとこう書いて済ましてしまいました。
【Rで球面幾何学】何故「正方形」ではCos(θ)+Sin(θ)iが成立するのか?
回転する正多角形上で用いられる三角関数は辺ごとの区間でリセットされ、これが辺数だけ繰り返されるのが「自明の場合(Trivial Case)」である。
実際の証明はピタゴラスの定理(Pythagorean theorem)あるいは三平方の定理(Three-square theorem)にまで遡ります。
【初心者向け】ピタゴラスの定理あるいは三平方の定理からの出発
このアニメーションでは「大」正方形に内接する「小」正方形が回っていますが、この範囲において両者の辺長の推移は単位円上のCos(θ)とSin(θ)の相対関係で捉えられます。
- Cos(0)=1の時にSin(0)=0、Sin(π/2)=1の時にCos(π/2)=0
- Cos(π/4)=Sin(π/4)=sqrt(2)/2*2。これは単位円に内接する正方形の1辺の長さ/2に対応する。
これを用いてCos(θ)とSin(θ)の加算と乗算の結果を列記すると…
- Cos(θ)+Sin(θ)の最小値は1(Cos(0)=1&Sin(0)=0もしくCos(π/2)=0&Sin(π/2)=1)
- Cos(θ)+Sin(θ)の最大値は1+sqrt(2)(最小値+sqrt(2)/2*2)
- Cos(θ)*Sin(θ)の最小値は0(Sin(0)=0もしくはCos(π/2)=0の時)
- Cos(θ)*Sin(θ)の最大値は0.5(sqrt(2)/2^2)
- Cos(θ)^2+Sin(θ)^2の結果は常に1(1+0~0.5+0.5~0+1)
【Rで球面幾何学】何故「正方形」ではCos(θ)+Sin(θ)iが成立するのか?
そう、式Cos(θ)+Sin(θ)iは円を描きますが、式Cos(θ)+Sin(θ)はその多角形に外接/内接する同心円の増減比率を表すのです。
Target_size | Target_names | Target_values | |
---|---|---|---|
1 | 2^-1 | 2^-1(2^-0.5r) | 0.5 |
2 | 2^-1 | 2^-1d=2^-1*4 | 1 |
3 | 2^-1 | 2^-1a1=2^0a0 | sqrt(2)=1.414214 |
4 | 2^-1 | 2^-1a1(2^-0.5a0)*4 | 4sqrt(2)=5.656854 |
5 | 2^-0.5 | 2^-0.5(2^0r) | sqrt(2)/2=0.7071068 |
6 | 2^-0.5 | 2^-0.5d=2^-0.5*4 | sqrt(2)=1.414214 |
7 | 2^-0.5 | 2^-0.5a1=2^0a0 | 1 |
8 | 2^-0.5 | 2^-1a1(2^0.5a0)*4 | 4 |
9 | 2^0 | 2^0(2^-0.5R,2^0.5r) | 1 |
10 | 2^0 | 2^0d=2^0*4 | 2 |
11 | 2^0 | 2^0a1=2^0.5a0 | sqrt(8)=2sqrt(2)=2.828427 |
12 | 2^0 | 2^0a1(2^0.5a0)*4 | sqrt(32)=4sqrt(2)=5.656854 |
13 | 2^0.5 | 2^0.5(2^-0R,2^1r) | sqrt(2)=1.414214 |
14 | 2^0.5 | 2^0.5d=2^0.5*4 | 2sqrt(2)=2.828427 |
15 | 2^0.5 | 2^0.5a1=2^1a0 | 4 |
16 | 2^0.5 | 2^0.5a1(2^0a0)*4 | 8 |
17 | 2^1 | 2^1(2^1-0.5R,2^0.5r) | 2 |
target_size<-c("2^-1","2^-1","2^-1","2^-1","2^-0.5","2^-0.5","2^-0.5","2^-0.5","2^0","2^0","2^0","2^0","2^0.5","2^0.5","2^0.5","2^0.5","2^1")
target_names<-c("2^-1(2^-0.5r)","2^-1d=2^-1*4","2^-1a1=2^0a0","2^-1a1(2^-0.5a0)*4","2^-0.5(2^0r)","2^-0.5d=2^-0.5*4","2^-0.5a1=2^0a0","2^-1a1(2^0.5a0)*4","2^0(2^-0.5R,2^0.5r)","2^0d=2^0*4","2^0a1=2^0.5a0","2^0a1(2^0.5a0)*4","2^0.5(2^-0R,2^1r)","2^0.5d=2^0.5*4","2^0.5a1=2^1a0","2^0.5a1(2^0a0)*4","2^1(2^1-0.5R,2^0.5r)")
target_values<-c("0.5","1","sqrt(2)=1.414214","4sqrt(2)=5.656854","sqrt(2)/2=0.7071068","sqrt(2)=1.414214","1","4","1","2","sqrt(8)=2sqrt(2)=2.828427","sqrt(32)=4sqrt(2)=5.656854","sqrt(2)=1.414214","2sqrt(2)=2.828427","4","8","2")
Regula_falsi04<-data.frame(Target_size=target_size,Target_names=target_names,Target_values=target_values)
library(xtable)
print(xtable(Regula_falsi04), type = "html")
c0=seq(0,2*pi,length=9)
c1=c(sqrt(2),2,sqrt(2),2,sqrt(2),2,sqrt(2),2,sqrt(2))
c2=c(1,sqrt(2),1,sqrt(2),1,sqrt(2),1,sqrt(2),1)
c3=c(sqrt(2)/2,1,sqrt(2)/2,1,sqrt(2)/2,1,sqrt(2)/2,1,sqrt(2)/2)
plot(c0,c1,type="o",xlim=c(0,2*pi),ylim=c(sqrt(2)/2,2),main="Expected Multilayered Tori",ylab='x', xlab='y')
par(new=T) #上書き
plot(c0,c2,type="o",xlim=c(0,2*pi),ylim=c(sqrt(2)/2,2),main="",ylab='', xlab='')
par(new=T) #上書き
plot(c0,c3,type="o",xlim=c(0,2*pi),ylim=c(sqrt(2)/2,2),main="",ylab='', xlab='')
#外接円=内接円による境界線
abline(h=2,col=rgb(1,0,0))
abline(h=sqrt(2),col=rgb(0,1,0))
abline(h=1,col=rgb(0,0,1))
abline(h=1/sqrt(2),col=rgb(1,0,1))
abline(h=1/sqrt(2)^2,col=rgb(1,1,0))
#凡例
legend("bottomright", legend=c("Mj=2+Mn,Mn=√8/2","Mj=√2+Mn,Mn=(2-√2)/2","Mj=1+Mn,Mn=(√2-1)/2","Mj=√2/2+Mn,Mn=(1-√2/2)/2","Mj=1/2+Mn,Mn=(√2/2-1/2)/2"), lty=c(1,1,1,1,1), col=c(rgb(1,0,0),rgb(0,1,0),rgb(0,0,1),rgb(1,0,1),rgb(1,1,0)))
f0<-function(x){cos(x)+sin(x)}
plot(f0,xlim=c(0,pi/2),ylim=c(1,sqrt(2)),main="Expected Sampling results")
R_time=seq(0,2*pi,length=400)
Smp_time=seq(0,pi/2,length=100)
#標準円(半径1→sqrt(2))
f0<-function(x){cos(x)+cos(x-pi/2)}
S_data<-c(f0(Smp_time),f0(Smp_time),f0(Smp_time),f0(Smp_time))
plot(R_time,S_data,type="l",xlim=c(0,2*pi),ylim=c(0.5,2),main="Torus drawn by circumscribed and inscribed circle",ylab='Circumference(radian)', xlab='Circle radius')
#半径sqrt(2)→2
par(new=T) #上書き
S_data<-c(f0(Smp_time)*sqrt(2),f0(Smp_time)*sqrt(2),f0(Smp_time)*sqrt(2),f0(Smp_time)*sqrt(2))
plot(R_time,S_data,type="l",xlim=c(0,2*pi),ylim=c(0.5,2),ylab='', xlab='')
#半径1→1/sqrt(2)
par(new=T) #上書き
S_data<-c(f0(Smp_time)/sqrt(2),f0(Smp_time)/sqrt(2),f0(Smp_time)/sqrt(2),f0(Smp_time)/sqrt(2))
plot(R_time,S_data,type="l",xlim=c(0,2*pi),ylim=c(0.5,2),ylab='', xlab='')
#半径1/sqrt(2)→1/2
par(new=T) #上書き
S_data<-c(f0(Smp_time)/sqrt(2)^2,f0(Smp_time)/sqrt(2)^2,f0(Smp_time)/sqrt(2)^2,f0(Smp_time)/sqrt(2)^2)
plot(R_time,S_data,type="l",xlim=c(0,2*pi),ylim=c(0.5,2),ylab='', xlab='')
#外接円=内接円による境界線
abline(h=2,col=rgb(1,0,0))
abline(h=sqrt(2),col=rgb(0,1,0))
abline(h=1,col=rgb(0,0,1))
abline(h=1/sqrt(2),col=rgb(1,0,1))
abline(h=1/sqrt(2)^2,col=rgb(1,1,0))
#凡例
legend("bottomright", legend=c("Mj=2+Mn,Mn=√8/2","Mj=√2+Mn,Mn=(2-√2)/2","Mj=1+Mn,Mn=(√2-1)/2","Mj=√2/2+Mn,Mn=(1-√2/2)/2","Mj=1/2+Mn,Mn=(√2/2-1/2)/2"), lty=c(1,1,1,1,1), col=c(rgb(1,0,0),rgb(0,1,0),rgb(0,0,1),rgb(1,0,1),rgb(1,1,0)))
実はこの様な内接多角形/外接多角形の関係は正三角形(Equilateral Triangle)にも見て取れます。
Three_square_theorem03<-function(x){
c0<-c(0,2/3*pi,-2/3*pi,0)
c0_cos<-cos(c0)
c0_sin<-sin(c0)
plot(c0_cos,c0_sin,type="l",xlim=c(-1,1),ylim=c(-1,1),main="Regular polygon rotation",xlab="Cos(θ)",ylab="Sin(θ)")
text(c0_cos,c0_sin, labels=c("a","b","c",""),col=c(rgb(1,0,0),rgb(1,0,0),rgb(1,0,0),rgb(1,0,0)),cex=c(2,2,2,2))
line_scale_01_cos<-seq(cos(c0[1]),cos(c0[2]),length=15)
line_scale_01_sin<-seq(sin(c0[1]),sin(c0[2]),length=15)
line_scale_02_cos<-seq(cos(c0[2]),cos(c0[3]),length=15)
line_scale_02_sin<-seq(sin(c0[2]),sin(c0[3]),length=15)
line_scale_03_cos<-seq(cos(c0[3]),cos(c0[1]),length=15)
line_scale_03_sin<-seq(sin(c0[3]),sin(c0[1]),length=15)
text(c(line_scale_01_cos[x],line_scale_02_cos[x],line_scale_03_cos[x]),c(line_scale_01_sin[x],line_scale_02_sin[x],line_scale_03_sin[x]), labels=c("ab","bc","ca"),col=c(rgb(0,0,1),rgb(0,0,1),rgb(0,0,1)),cex=c(2,2,2))
#塗りつぶし
polygon(c(c0_cos[1],line_scale_03_cos[x],line_scale_01_cos[x],c0_cos[1]), #x
c(c0_sin[1],line_scale_03_sin[x],line_scale_01_sin[x],c0_sin[1]), #y
density=c(30), #塗りつぶす濃度
angle=c(45), #塗りつぶす斜線の角度
col=rgb(0,1,0))
#塗りつぶし
polygon(c(c0_cos[2],line_scale_01_cos[x],line_scale_02_cos[x],c0_cos[2]), #x
c(c0_sin[2],line_scale_01_sin[x],line_scale_02_sin[x],c0_sin[2]), #y
density=c(30), #塗りつぶす濃度
angle=c(45), #塗りつぶす斜線の角度
col=rgb(0,1,0))
#塗りつぶし
polygon(c(c0_cos[3],line_scale_02_cos[x],line_scale_03_cos[x],c0_cos[3]), #x
c(c0_sin[3],line_scale_02_sin[x],line_scale_03_sin[x],c0_sin[3]), #y
density=c(30), #塗りつぶす濃度
angle=c(45), #塗りつぶす斜線の角度
col=rgb(0,1,0))
}
#アニメーション
library("animation")
Time_Code=c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)
saveGIF({
for (i in Time_Code){
Three_square_theorem03(i)
}
}, interval = 0.1, movie.name = "TEST003.gif")
実際、単位円(Unit Circle)上に同心円を描く任意の正三角形内で正三角形を回すと、その片長の比は2:2と1:2の間を反復し続けます。そしてその比は多層化された内接円と外接円の半径比の推移に等しいのです。
Target_size | Target_names | Target_values | |
---|---|---|---|
1 | 3^-1 | 3^-1(3^0r) | 1/2=0.5 |
2 | 3^-1 | 3^-1h=3^-1*3 | 3/2=1.5 |
3 | 3^-1 | 3^-1a1=3^0a0 | 2*sqrt(1.5)=2.44949 |
4 | 3^-1 | 3^-1a1(3^0a0)*3 | 6*sqrt(1.5)=7.348469 |
5 | 3^0 | 3^0(3^-1R,3^1r) | 1.0 |
6 | 3^0 | 3^0h=3^0*3 | 3.0 |
7 | 3^0 | 3^0a1=3^1a0 | 2*sqrt(3)=3.464102 |
8 | 3^0 | 3^0a1(3^1a0)*3 | 6*sqrt(3)=10.3923 |
9 | 3^1 | 3^1(3^0R) | 3.0 |
target_size<-c("3^-1","3^-1","3^-1","3^-1","3^0","3^0","3^0","3^0","3^1")
target_names<-c("3^-1(3^0r)","3^-1h=3^-1*3","3^-1a1=3^0a0","3^-1a1(3^0a0)*3","3^0(3^-1R,3^1r)","3^0h=3^0*3","3^0a1=3^1a0","3^0a1(3^1a0)*3","3^1(3^0R)")
target_values<-c("1/2=0.5","3/2=1.5","2*sqrt(1.5)=2.44949","6*sqrt(1.5)=7.348469","1.0","3.0","2*sqrt(3)=3.464102","6*sqrt(3)=10.3923","3.0")
Regula_falsi03<-data.frame(Target_size=target_size,Target_names=target_names,Target_values=target_values)
library(xtable)
print(xtable(Regula_falsi03), type = "html")
c0=seq(0,2*pi,length=7)
c1=c(2,4,2,4,2,4,2)
c2=c(1,2,1,2,1,2,1)
c3=c(1/2,1,1/2,1,1/2,1,1/2)
plot(c0,c1,type="o",xlim=c(0,2*pi),ylim=c(1/2,4),ylab='x', xlab='y')
par(new=T) #上書き
plot(c0,c2,type="o",xlim=c(0,2*pi),ylim=c(1/2,4),ylab='', xlab='')
par(new=T) #上書き
plot(c0,c3,type="o",xlim=c(0,2*pi),ylim=c(1/2,4), main="Expected Multilayered Tori", ylab='', xlab='')
#外接円=内接円による境界線
abline(h=2,col=rgb(1,0,0))
abline(h=1,col=rgb(0,1,0))
abline(h=0.5,col=rgb(0,0,1))
#凡例
legend("bottomright", legend=c("Mj=2+Mn,Mn=1","Mj=1+Mn,Mn=1/2","Mj=1/2+Mn,Mn=1/4"), lty=c(1,1,1), col=c(rgb(1,0,0),rgb(0,1,0),rgb(0,0,1)))
R_time=seq(0,2*pi,length=300)
Smp_time=seq(0,2/3*pi,length=100)
#標準円(半径0.5→1)
f0<-function(x){cos(x-1/3*pi)}
S_data<-c(f0(Smp_time),f0(Smp_time),f0(Smp_time))
plot(R_time,S_data,type="l",xlim=c(0,2*pi),ylim=c(0.5,4),main="Torus drawn by circumscribed and inscribed circle",ylab='Circumference(radian)', xlab='Circle radius')
#半径1→2
par(new=T) #上書き
S_data<-c(f0(Smp_time)*2,f0(Smp_time)*2,f0(Smp_time)*2)
plot(R_time,S_data,type="l",xlim=c(0,2*pi),ylim=c(0.5,4),ylab='', xlab='')
#半径2→4)
par(new=T) #上書き
S_data<-c(f0(Smp_time)*4,f0(Smp_time)*4,f0(Smp_time)*4)
plot(R_time,S_data,type="l",xlim=c(0,2*pi),ylim=c(0.5,4),ylab='', xlab='')
#外接円=内接円による境界線
abline(h=2,col=rgb(1,0,0))
abline(h=1,col=rgb(0,1,0))
abline(h=0.5,col=rgb(0,0,1))
#凡例
legend("bottomright", legend=c("Mj=2+Mn,Mn=1","Mj=1+Mn,Mn=1/2","Mj=1/2+Mn,Mn=1/4"), lty=c(1,1,1), col=c(rgb(1,0,0),rgb(0,1,0),rgb(0,0,1)))
ただし正三角形の内接/外接関係においてはもはやその繰り返しがCos(θ)とSin(θ)の相関関係で説明出来ません。それは正五角形以上でも同じ事で、しかもかかる連続性自体がもはや観測されないのです。
Three_square_theorem05<-function(x){
c0<-seq(0,2*pi,length=6)
c0_cos<-cos(c0)
c0_sin<-sin(c0)
plot(c0_cos,c0_sin,type="l",main="Regular polygon rotation",xlab="Cos(θ)",ylab="Sin(θ)")
text(c0_cos,c0_sin, labels=c("a","b","c","d","e",""),col=c(rgb(1,0,0),rgb(1,0,0),rgb(1,0,0),rgb(1,0,0),rgb(1,0,0),rgb(1,0,0)),cex=c(2,2,2,2,2,2))
line_scale_01_cos<-seq(cos(c0[1]),cos(c0[2]),length=15)
line_scale_01_sin<-seq(sin(c0[1]),sin(c0[2]),length=15)
line_scale_02_cos<-seq(cos(c0[2]),cos(c0[3]),length=15)
line_scale_02_sin<-seq(sin(c0[2]),sin(c0[3]),length=15)
line_scale_03_cos<-seq(cos(c0[3]),cos(c0[4]),length=15)
line_scale_03_sin<-seq(sin(c0[3]),sin(c0[4]),length=15)
line_scale_04_cos<-seq(cos(c0[4]),cos(c0[5]),length=15)
line_scale_04_sin<-seq(sin(c0[4]),sin(c0[5]),length=15)
line_scale_05_cos<-seq(cos(c0[5]),cos(c0[1]),length=15)
line_scale_05_sin<-seq(sin(c0[5]),sin(c0[1]),length=15)
text(c(line_scale_01_cos[x],line_scale_02_cos[x],line_scale_03_cos[x],line_scale_04_cos[x],line_scale_05_cos[x]),c(line_scale_01_sin[x],line_scale_02_sin[x],line_scale_03_sin[x],line_scale_04_sin[x],line_scale_05_sin[x]), labels=c("ab","bc","cd","de","ea",""),col=c(rgb(0,0,1),rgb(0,0,1),rgb(0,0,1),rgb(0,0,1),rgb(0,0,1),rgb(0,0,1)),cex=c(2,2,2,2,2,2))
#塗りつぶし
polygon(c(c0_cos[1],line_scale_05_cos[x],line_scale_01_cos[x],c0_cos[1]), #x
c(c0_sin[1],line_scale_05_sin[x],line_scale_01_sin[x],c0_sin[1]), #y
density=c(30), #塗りつぶす濃度
angle=c(45), #塗りつぶす斜線の角度
col=rgb(0,1,0))
#塗りつぶし
polygon(c(c0_cos[2],line_scale_01_cos[x],line_scale_02_cos[x],c0_cos[2]), #x
c(c0_sin[2],line_scale_01_sin[x],line_scale_02_sin[x],c0_sin[2]), #y
density=c(30), #塗りつぶす濃度
angle=c(45), #塗りつぶす斜線の角度
col=rgb(0,1,0))
#塗りつぶし
polygon(c(c0_cos[3],line_scale_02_cos[x],line_scale_03_cos[x],c0_cos[3]), #x
c(c0_sin[3],line_scale_02_sin[x],line_scale_03_sin[x],c0_sin[3]), #y
density=c(30), #塗りつぶす濃度
angle=c(45), #塗りつぶす斜線の角度
col=rgb(0,1,0))
#塗りつぶし
polygon(c(c0_cos[4],line_scale_03_cos[x],line_scale_04_cos[x],c0_cos[4]), #x
c(c0_sin[4],line_scale_03_sin[x],line_scale_04_sin[x],c0_sin[4]), #y
density=c(30), #塗りつぶす濃度
angle=c(45), #塗りつぶす斜線の角度
col=rgb(0,1,0))
#塗りつぶし
polygon(c(c0_cos[5],line_scale_04_cos[x],line_scale_05_cos[x],c0_cos[5]), #x
c(c0_sin[5],line_scale_04_sin[x],line_scale_05_sin[x],c0_sin[5]), #y
density=c(30), #塗りつぶす濃度
angle=c(45), #塗りつぶす斜線の角度
col=rgb(0,1,0))
}
#アニメーション
library("animation")
Time_Code=c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)
saveGIF({
for (i in Time_Code){
Three_square_theorem05(i)
}
}, interval = 0.1, movie.name = "TEST005.gif")
Target_size | Target_names | Target_values | |
---|---|---|---|
1 | 5^-1 | 5^-1 | 1/5=0.2 |
2 | 5^-1 | 5^-1d | (1+sqrt(5))/2*0.2=0.3236068 |
3 | 5^-1 | 5^-1a1 | 0.2*1.796112=0.3592224 |
4 | 5^-1 | 5^-1a1*5 | 0.3592224*5=1.796112 |
5 | 5^-0.2722623 | 5^-0.2722623 | 0.3592224*1.796112=-0.2722623 |
6 | ... | ... | ... |
7 | 5^-0.131683 | 5^-0.131683 | 0.8090168 |
8 | 5^0 | 5^0a0 | 1/1.453085=0.688191 |
9 | 5^0 | 5^0a0*5 | 0.5567581*5=3.440955 |
10 | 5^0 | 5^0=1 | 1.0 |
11 | 5^0 | 5^0d | (1+sqrt(5))/2=1.618034 |
12 | 5^0 | 5^0a1 | 1.796112 |
13 | 5^0 | 5^0a1*5 | 1.796112*5=8.98056 |
14 | 5^0.1316829 | 5^0.7277376 | 1.796112*1.796112=3.226018 |
15 | ... | ... | ... |
16 | 5^0.535628 | 5^0.535628 | 3.440955*1.453085=2.368034 |
17 | 5^1 | 5^0a1 | 5/1.453085=3.440955 |
18 | 5^1 | 5^0a1*5 | 3.440955*5=17.20478 |
19 | 5^1 | 5^1 | 5 |
20 | 5^1 | 5^1d | ((1+sqrt(5))/2)*5=8.09017 |
target_size<-c("5^-1","5^-1","5^-1","5^-1","5^-0.2722623","...","5^-0.131683","5^0","5^0","5^0","5^0","5^0","5^0","5^0.1316829","...","5^0.535628","5^1","5^1","5^1","5^1")
target_names<-c("5^-1","5^-1d","5^-1a1","5^-1a1*5","5^-0.2722623","...","5^-0.131683","5^0a0","5^0a0*5","5^0=1","5^0d","5^0a1","5^0a1*5","5^0.7277376","...","5^0.535628","5^0a1","5^0a1*5","5^1","5^1d")
target_values<-c("1/5=0.2","(1+sqrt(5))/2*0.2=0.3236068","0.2*1.796112=0.3592224","0.3592224*5=1.796112","0.3592224*1.796112=-0.2722623","...","0.8090168","1/1.453085=0.688191","0.5567581*5=3.440955","1.0","(1+sqrt(5))/2=1.618034","1.796112","1.796112*5=8.98056","1.796112*1.796112=3.226018","...","3.440955*1.453085=2.368034","5/1.453085=3.440955","3.440955*5=17.20478","5","((1+sqrt(5))/2)*5=8.09017")
Regula_falsi05<-data.frame(Target_size=target_size,Target_names=target_names,Target_values=target_values)
library(xtable)
print(xtable(Regula_falsi05), type = "html")
こうした展開を連続的に扱う為に式Cos(θ)+Sin(θ)(i)を式Cos(θ)+Cos(θ-π/NoS)(i)(NoS=Number of Sides)に拡張する必要性が出てくる訳なんですね。
【Rで球面幾何学】二辺形(Bilateral)と一辺形(One Side)?
そんな感じで以下続報…